Don't indent softwrap if ruler is off

Ref #1450
This commit is contained in:
Zachary Yedidia
2020-01-05 20:32:29 -05:00
parent 955bde4abc
commit c7f36f9480

View File

@@ -274,7 +274,9 @@ func (w *BufWindow) LocFromVisual(svloc buffer.Loc) buffer.Loc {
}
vloc.X = 0
// This will draw an empty line number because the current line is wrapped
vloc.X += maxLineNumLength + 1
if b.Settings["ruler"].(bool) {
vloc.X += maxLineNumLength + 1
}
}
}
}
@@ -573,7 +575,9 @@ func (w *BufWindow) displayBuffer() {
}
vloc.X = 0
// This will draw an empty line number because the current line is wrapped
w.drawLineNum(lineNumStyle, true, maxLineNumLength, &vloc, &bloc)
if b.Settings["ruler"].(bool) {
w.drawLineNum(lineNumStyle, true, maxLineNumLength, &vloc, &bloc)
}
}
}
}