Skip to content

Commit

Permalink
Revert changes in *View.MoveCursor
Browse files Browse the repository at this point in the history
  • Loading branch information
jroimartin committed Oct 11, 2016
1 parent d822523 commit 4e9ce9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 4e9ce9a

Please sign in to comment.