aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-24 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-24 20:20:20 +0200
commit750a584beba60b3eea42e965748187758e71daf1 (patch)
tree15c16fd1505a12f15da6659768f3f7c049e6fe5f
parentrefactor (diff)
downloadhardflip-750a584beba60b3eea42e965748187758e71daf1.tar.gz
hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.bz2
hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.xz
hardflip-750a584beba60b3eea42e965748187758e71daf1.tar.zst
hardflip-750a584beba60b3eea42e965748187758e71daf1.zip
qwe
-rw-r--r--src/e_keys.go36
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
-}