diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2018-02-23 19:33:21 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2018-02-23 19:33:21 +0100 |
commit | ce20fc8a9d249798e9349679b37d9452ee14c3e0 (patch) | |
tree | 1872f585ede48e8b31f2ee18d22aa4047b1e6a52 /view.go | |
parent | 10c348f72b786e7894f326dc34feb6d7aaa74daa (diff) | |
download | poe-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.go | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -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 |