diff options
author | Joe <rbo@gmx.us> | 2024-04-24 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-04-24 20:20:20 +0200 |
commit | 750a584beba60b3eea42e965748187758e71daf1 (patch) | |
tree | 15c16fd1505a12f15da6659768f3f7c049e6fe5f /src/e_keys.go | |
parent | refactor (diff) | |
download | hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.gz hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.bz2 hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.xz hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.zst hardflip-750a584beba60b3eea42e965748187758e71daf1.zip |
qwe
Diffstat (limited to 'src/e_keys.go')
-rw-r--r-- | src/e_keys.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/e_keys.go b/src/e_keys.go index 4f45d85..01e800f 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -242,6 +242,24 @@ func e_welcome_events(data *HardData, event tcell.EventKey) bool { return false } +func e_mkdir_events(data *HardData, event tcell.EventKey) bool { + if event.Key() == tcell.KeyEscape || + event.Key() == tcell.KeyCtrlC { + data.ui.s.HideCursor() + data.ui.mode = NORMAL_MODE + data.ui.buff = "" + data.insert = nil + } else if event.Key() == tcell.KeyEnter { + e_mkdir(data, &data.ui) + data.ui.s.HideCursor() + data.ui.mode = NORMAL_MODE + data.ui.buff = "" + } else { + e_readline(event, &data.ui.buff) + } + return false +} + func e_insert_events(data *HardData, event tcell.EventKey) bool { ui := &data.ui @@ -655,21 +673,3 @@ func e_insert_events(data *HardData, event tcell.EventKey) bool { } return false } - -func e_mkdir_events(data *HardData, event tcell.EventKey) bool { - if event.Key() == tcell.KeyEscape || - event.Key() == tcell.KeyCtrlC { - data.ui.s.HideCursor() - data.ui.mode = NORMAL_MODE - data.ui.buff = "" - data.insert = nil - } else if event.Key() == tcell.KeyEnter { - e_mkdir(data, &data.ui) - data.ui.s.HideCursor() - data.ui.mode = NORMAL_MODE - data.ui.buff = "" - } else { - e_readline(event, &data.ui.buff) - } - return false -} |