From 6d5a4c2610aaddc58efaf805ed925022789a5383 Mon Sep 17 00:00:00 2001 From: Felix Angell Date: Mon, 4 Jun 2018 20:27:23 +0100 Subject: [PATCH] more text selection semantic cleanups --- gui/buffer.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gui/buffer.go b/gui/buffer.go index e604465..1c6f755 100644 --- a/gui/buffer.go +++ b/gui/buffer.go @@ -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 }