diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 6cf2aaba..9e94578c 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -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]) ||