From 0b3c0c44100b17b31195f2e5891bd340192fb17d Mon Sep 17 00:00:00 2001 From: Hubert Hirtz Date: Wed, 5 Aug 2020 15:17:52 +0200 Subject: editor: handle DEL key --- ui/ui.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/ui.go') 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() -- cgit v1.2.3