Fix colorcolumn being ignored
Closes
@@ -723,6 +723,14 @@ func (v *View) DisplayView() {
realLineN++
}
+ colorcolumn := int(v.Buf.Settings["colorcolumn"].(float64))
+ if colorcolumn != 0 {
+ style := GetColor("color-column")
+ fg, _, _ := style.Decompose()
+ st := defStyle.Background(fg)
+ screen.SetContent(xOffset+colorcolumn, yOffset+visualLineN, ' ', nil, st)
+ }
+
screenX = v.x
// If there are gutter messages we need to display the '>>' symbol here
@@ -816,6 +824,13 @@ func (v *View) DisplayView() {
if char != nil {
lineStyle := char.style
+ colorcolumn := int(v.Buf.Settings["colorcolumn"].(float64))
+ if colorcolumn != 0 && char.visualLoc.X == colorcolumn {
+ style := GetColor("color-column")
+ fg, _, _ := style.Decompose()
+ lineStyle = lineStyle.Background(fg)
+ }
+
charLoc := char.realLoc
if v.Cursor.HasSelection() &&
(charLoc.GreaterEqual(v.Cursor.CurSelection[0]) && charLoc.LessThan(v.Cursor.CurSelection[1]) ||
