aboutsummaryrefslogtreecommitdiff
path: root/view.go
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2018-02-23 19:33:21 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2018-02-23 19:33:21 +0100
commitce20fc8a9d249798e9349679b37d9452ee14c3e0 (patch)
tree1872f585ede48e8b31f2ee18d22aa4047b1e6a52 /view.go
parent10c348f72b786e7894f326dc34feb6d7aaa74daa (diff)
downloadpoe-ce20fc8a9d249798e9349679b37d9452ee14c3e0.tar.gz
poe-ce20fc8a9d249798e9349679b37d9452ee14c3e0.tar.bz2
poe-ce20fc8a9d249798e9349679b37d9452ee14c3e0.zip
Make arrow right move q1, end of selection.
Diffstat (limited to 'view.go')
-rw-r--r--view.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/view.go b/view.go
index 4d9150a..ff272a6 100644
--- a/view.go
+++ b/view.go
@@ -4,7 +4,6 @@ import (
"io"
"path/filepath"
"time"
- "unicode"
"unicode/utf8"
"github.com/atotto/clipboard"
@@ -358,18 +357,12 @@ func (v *View) HandleEvent(ev tcell.Event) {
case tcell.KeyCR: // use unix style 0x0A (\n) for new lines
key = tcell.KeyLF
case tcell.KeyRight:
- //if ev.Modifiers()&tcell.ModShift != 0 {
- // v.text.ExpandDot(1, 1)
- //} else {
+ _, q1 := v.text.Dot()
+ v.SetCursor(q1, io.SeekStart)
v.SetCursor(utf8.RuneLen(v.Rune()), io.SeekCurrent)
- //}
return
case tcell.KeyLeft:
- //if ev.Modifiers()&tcell.ModShift != 0 {
- // v.text.ExpandDot(1, -1)
- //} else {
v.SetCursor(-1, io.SeekCurrent)
- //}
return
case tcell.KeyDown:
fallthrough