]> git.lizzy.rs Git - micro.git/commitdiff
Don't indent softwrap if ruler is off
authorZachary Yedidia <zyedidia@gmail.com>
Mon, 6 Jan 2020 01:32:29 +0000 (20:32 -0500)
committerZachary Yedidia <zyedidia@gmail.com>
Mon, 6 Jan 2020 01:32:29 +0000 (20:32 -0500)
Ref #1450

internal/display/bufwindow.go

index 21bf8bfa05d08f37381459e4bf33e931f1ede54e..7d23703e213d0f0e253d74b2556eb4a8e67991ba 100644 (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)
+                                       }
                                }
                        }
                }