Fix JumpLine range

Fixes #187
This commit is contained in:
Zachary Yedidia 2016-06-28 21:26:19 -04:00
parent 22257df9a4
commit aa8a329745

View file

@ -1030,7 +1030,7 @@ func (v *View) JumpLine() bool {
return false
}
// Move cursor and view if possible.
if lineint < v.Buf.NumLines {
if lineint < v.Buf.NumLines && lineint >= 0 {
v.Cursor.X = 0
v.Cursor.Y = lineint
return true