mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 14:47:16 +09:00
Fix moving to end of line on cursor down
This commit is contained in:
@@ -258,7 +258,7 @@ func (c *Cursor) UpN(amount int) {
|
|||||||
runes := []rune(c.buf.Line(c.Y))
|
runes := []rune(c.buf.Line(c.Y))
|
||||||
c.X = c.GetCharPosInLine(proposedY, c.LastVisualX)
|
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)
|
c.X = len(runes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user