]> git.lizzy.rs Git - micro.git/commitdiff
add missing offset to current highlighting line. Fix #795
authortommy <tommy.shem1@googlemail.com>
Sat, 2 Sep 2017 08:40:35 +0000 (09:40 +0100)
committertommy <tommy.shem1@googlemail.com>
Sat, 2 Sep 2017 08:40:35 +0000 (09:40 +0100)
cmd/micro/view.go

index fa628b18e7ac173c0d1c2484d7e281ce2e4528b0..92ae56b01168c20208f31fc69f46e169f370dc2b 100644 (file)
@@ -935,7 +935,7 @@ func (v *View) DisplayView() {
 
                if v.Buf.Settings["cursorline"].(bool) && tabs[curTab].CurView == v.Num &&
                        !v.Cursor.HasSelection() && v.Cursor.Y == realLineN {
-                       for i := lastX; i < xOffset+v.Width; i++ {
+                       for i := lastX; i < xOffset+v.Width-v.lineNumOffset; i++ {
                                style := GetColor("cursor-line")
                                fg, _, _ := style.Decompose()
                                style = style.Background(fg)