more text selection semantic cleanups

This commit is contained in:
Felix Angell 2018-06-04 20:27:23 +01:00
parent 619bb38ae8
commit 6d5a4c2610

View File

@ -791,16 +791,13 @@ func (b *Buffer) processSelection(key int) bool {
break
case sdl.K_UP:
lastSelection.ey--
lineLen := b.table.Lines[lastSelection.ey].Len()
lastSelection.ex = lineLen
b.moveUp()
b.moveToEndOfLine()
lastSelection.ex = b.curs.x
break
case sdl.K_DOWN:
lastSelection.ey++
lastSelection.ex = 0
b.moveDown()
lastSelection.ex = b.curs.x
break
}