Revert changes in *View.MoveCursor

This commit is contained in:
Roi Martin 2016-10-11 10:18:38 +02:00
parent d822523f8c
commit 4e9ce9a8e2

View File

@ -137,7 +137,7 @@ func (v *View) MoveCursor(dx, dy int, writeMode bool) {
}
} else {
if y >= 0 && y < len(v.viewLines) {
curLineWidth = len(v.viewLines[y].line) - 1
curLineWidth = len(v.viewLines[y].line)
if v.Wrap && curLineWidth >= maxX {
curLineWidth = maxX - 1
}
@ -147,7 +147,7 @@ func (v *View) MoveCursor(dx, dy int, writeMode bool) {
}
// get the width of the previous line
if y-1 >= 0 && y-1 < len(v.viewLines) {
prevLineWidth = len(v.viewLines[y-1].line) - 1
prevLineWidth = len(v.viewLines[y-1].line)
} else {
prevLineWidth = 0
}