mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 23:05:40 -04:00
FIX: ruler drawn on top of the tab bar
Wrap function lacked a condition to avoid drawing below 0.
This commit is contained in:
parent
809db4ee24
commit
497df198dc
@ -619,16 +619,21 @@ func (w *BufWindow) displayBuffer() {
|
|||||||
|
|
||||||
wrap := func() {
|
wrap := func() {
|
||||||
vloc.X = 0
|
vloc.X = 0
|
||||||
if w.hasMessage {
|
|
||||||
w.drawGutter(&vloc, &bloc)
|
|
||||||
}
|
|
||||||
if b.Settings["diffgutter"].(bool) {
|
|
||||||
w.drawDiffGutter(lineNumStyle, true, &vloc, &bloc)
|
|
||||||
}
|
|
||||||
|
|
||||||
// This will draw an empty line number because the current line is wrapped
|
if vloc.Y >= 0 {
|
||||||
if b.Settings["ruler"].(bool) {
|
if w.hasMessage {
|
||||||
w.drawLineNum(lineNumStyle, true, &vloc, &bloc)
|
w.drawGutter(&vloc, &bloc)
|
||||||
|
}
|
||||||
|
if b.Settings["diffgutter"].(bool) {
|
||||||
|
w.drawDiffGutter(lineNumStyle, true, &vloc, &bloc)
|
||||||
|
}
|
||||||
|
|
||||||
|
// This will draw an empty line number because the current line is wrapped
|
||||||
|
if b.Settings["ruler"].(bool) {
|
||||||
|
w.drawLineNum(lineNumStyle, true, &vloc, &bloc)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
vloc.X = w.gutterOffset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user