Fix SelectLine

This commit is contained in:
Zachary Yedidia 2016-04-23 14:02:20 -04:00
parent ab4abf2a93
commit 0fac02cd08

View file

@ -110,7 +110,11 @@ func (c *Cursor) SelectLine() {
c.Start()
c.curSelection[0] = c.Loc()
c.End()
c.curSelection[1] = c.Loc() + 1
if len(c.v.buf.lines)-1 > c.y {
c.curSelection[1] = c.Loc() + 1
} else {
c.curSelection[1] = c.Loc()
}
c.origSelection = c.curSelection
}