More work on porting diff kitten

This commit is contained in:
Kovid Goyal
2023-03-18 15:14:31 +05:30
parent e4d936b5ed
commit ee82cb5a52
6 changed files with 160 additions and 14 deletions

View File

@@ -381,3 +381,17 @@ func (self *Loop) Quit(exit_code int) {
self.exit_code = exit_code
self.keep_going = false
}
type DefaultColor int
const (
BACKGROUND DefaultColor = 11
FOREGROUND = 10
CURSOR = 12
SELECTION_BG = 17
SELECTION_FG = 18
)
func (self *Loop) SetDefaultColor(which DefaultColor, val style.RGBA) {
self.QueueWriteString(fmt.Sprintf("\033]%d;%s\033\\", int(which), val.AsRGBSharp()))
}