diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-15 10:56:49 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-16 15:19:32 +1000 |
commit | 00afa30ebff2978e88cdab460b0f8ad818e1b502 (patch) | |
tree | 73dc5c7b537d1eab4702c78a7e14cdb55c6ab158 /vendor | |
parent | 6a153acc8f5695b9176a8d1b196dfd9eeb5ee34e (diff) |
better appearance for reverse attribute
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/view.go | 6 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go index cb735bd73..d2c2b75f1 100644 --- a/vendor/github.com/jesseduffield/gocui/view.go +++ b/vendor/github.com/jesseduffield/gocui/view.go @@ -922,6 +922,7 @@ func (v *View) draw() error { y := 0 emptyCell := cell{chr: ' ', fgColor: ColorDefault, bgColor: ColorDefault} + var prevFgColor Attribute for _, vline := range v.viewLines[start:] { if y >= maxY { break @@ -940,8 +941,13 @@ func (v *View) draw() error { if j > len(vline.line)-1 { c = emptyCell + c.fgColor = prevFgColor } else { c = vline.line[j] + // capturing previous foreground colour so that if we're using the reverse + // attribute we honour the final character's colour and don't awkwardly switch + // to a new background colour for the remainder of the line + prevFgColor = c.fgColor } fgColor := c.fgColor diff --git a/vendor/modules.txt b/vendor/modules.txt index 56d9fc240..a7f378b45 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -169,7 +169,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem github.com/jesseduffield/go-git/v5/utils/merkletrie/index github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame github.com/jesseduffield/go-git/v5/utils/merkletrie/noder -# github.com/jesseduffield/gocui v0.3.1-0.20220415000211-a826601ada29 +# github.com/jesseduffield/gocui v0.3.1-0.20220415005542-2eb424ce3d0a ## explicit; go 1.12 github.com/jesseduffield/gocui # github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e |