]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/cursor.go
Merge pull request #613 from GeigerCounter/build_tools
[micro.git] / cmd / micro / cursor.go
index 65baa773ae0970723f5f19f2cedef364b0f6804c..a4a243d12798b5becc886a1e8dba013ecaf2bf43 100644 (file)
@@ -258,7 +258,7 @@ func (c *Cursor) UpN(amount int) {
        runes := []rune(c.buf.Line(c.Y))
        c.X = c.GetCharPosInLine(proposedY, c.LastVisualX)
 
-       if c.X > len(runes) {
+       if c.X > len(runes) || (amount < 0 && proposedY == c.Y) {
                c.X = len(runes)
        }