diff --git a/pkg/gocui/view.go b/pkg/gocui/view.go index babaae0fb..a23338c4c 100644 --- a/pkg/gocui/view.go +++ b/pkg/gocui/view.go @@ -156,6 +156,8 @@ type View struct { // instead of Sel{Bg,Fg}Colors for highlighting selected lines. HighlightInactive bool + HighlightInset int + // If Frame is true, a border will be drawn around the view. Frame bool @@ -674,7 +676,8 @@ func (v *View) setCharacter(x, y int, ch string, fgColor, bgColor Attribute) { rangeSelectEnd = max(relativeRangeSelectStart, v.cy) } - if y >= rangeSelectStart && y <= rangeSelectEnd { + inset := v.HighlightInset + if y >= rangeSelectStart && y <= rangeSelectEnd && x >= inset && x < v.InnerWidth()-inset { // this ensures we use the bright variant of a colour upon highlight fgColorComponent := fgColor & ^AttrAll if fgColorComponent >= AttrIsValidColor && fgColorComponent < AttrIsValidColor+8 { diff --git a/pkg/gui/views.go b/pkg/gui/views.go index b47e76c5a..ddf3e40a9 100644 --- a/pkg/gui/views.go +++ b/pkg/gui/views.go @@ -106,6 +106,9 @@ func (gui *Gui) createAllViews() error { view.AutoRenderHyperLinks = true } + gui.Views.Main.HighlightInset = 3 + gui.Views.Secondary.HighlightInset = 3 + gui.Views.Staging.Wrap = true gui.Views.StagingSecondary.Wrap = true gui.Views.PatchBuilding.Wrap = true