From 2f587c6d48fc00d00fee0f178170e7f2b0bbcf51 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Fri, 15 Sep 2017 16:09:33 -0400 Subject: [PATCH] Fix moving to end of line on cursor down --- cmd/micro/cursor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/micro/cursor.go b/cmd/micro/cursor.go index 65baa773..a4a243d1 100644 --- a/cmd/micro/cursor.go +++ b/cmd/micro/cursor.go @@ -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) }