summaryrefslogtreecommitdiff
path: root/ui/ui.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtzfr.eu>2020-08-05 15:17:52 +0200
committerHubert Hirtz <hubert@hirtzfr.eu>2020-08-05 15:18:11 +0200
commit0b3c0c44100b17b31195f2e5891bd340192fb17d (patch)
treed592a906f80983bee1730d57e7f3c3f20e3f933e /ui/ui.go
parenteditor: handle HOME and END keys (diff)
editor: handle DEL key
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 8cbfea1..9ea1381 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -174,6 +174,14 @@ func (ui *UI) InputBackspace() (ok bool) {
return
}
+func (ui *UI) InputDelete() (ok bool) {
+ ok = ui.e.RemRuneForward()
+ if ok {
+ ui.draw()
+ }
+ return
+}
+
func (ui *UI) InputEnter() (content string) {
content = ui.e.Flush()
ui.draw()