mirror of
https://github.com/aditya-K2/gspt.git
synced 2026-01-09 13:58:05 -05:00
consistent colors for iview visual mode
This commit is contained in:
@@ -250,12 +250,14 @@ func (i *interactiveView) update() {
|
||||
_, _, w, _ := i.Table.GetInnerRect()
|
||||
for x := range s {
|
||||
b := ""
|
||||
fg := tcell.ColorDefault
|
||||
if i.visual && (x >= i.vrange.Start && x <= i.vrange.End) {
|
||||
b = "[blue::]█[::]"
|
||||
fg = tcell.ColorBlue
|
||||
}
|
||||
n := len(s[x])
|
||||
i.Table.SetCell(x, 0,
|
||||
GetCell(b, Defaultstyle))
|
||||
GetCell(b, tcell.StyleDefault.Foreground(fg).Background(fg)))
|
||||
for y := range s[x] {
|
||||
i.Table.SetCell(x, y+1,
|
||||
GetCell(s[x][y].Content, s[x][y].Style).SetMaxWidth(w/n).SetExpansion(1))
|
||||
|
||||
Reference in New Issue
Block a user