diff options
author | Joe <rbo@gmx.us> | 2024-02-21 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-02-21 20:20:20 +0100 |
commit | c4119bb050fb95099142b254743f7fbcf6e192f1 (patch) | |
tree | bf93b5ac83b420b34d79e228770167801c3da209 | |
parent | ok (diff) | |
download | hardflip-c4119bb050fb95099142b254743f7fbcf6e192f1.tar.gz hardflip-c4119bb050fb95099142b254743f7fbcf6e192f1.tar.bz2 hardflip-c4119bb050fb95099142b254743f7fbcf6e192f1.tar.xz hardflip-c4119bb050fb95099142b254743f7fbcf6e192f1.tar.zst hardflip-c4119bb050fb95099142b254743f7fbcf6e192f1.zip |
tmp
-rw-r--r-- | src/c_defs.go | 1 | ||||
-rw-r--r-- | src/i_events.go | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/c_defs.go b/src/c_defs.go index 12169f8..8fa69e6 100644 --- a/src/c_defs.go +++ b/src/c_defs.go @@ -76,6 +76,7 @@ const ( ERROR_MODE = 3 WELCOME_MODE = 4 MKDIR_MODE = 5 + INSERT_MODE = 6 ) const ( diff --git a/src/i_events.go b/src/i_events.go index 4c37315..3767fa9 100644 --- a/src/i_events.go +++ b/src/i_events.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_events.go - * Wed Feb 21 12:10:39 2024 + * Wed Feb 21 14:39:57 2024 * Joe * * events in the code @@ -441,6 +441,9 @@ func i_events(data *HardData) { } else { i_unfold_dir(data, data.litems.curr) } + } else if event.Rune() == 'a' || + event.Rune() == 'i' { + data.ui.mode = INSERT_MODE } else if event.Key() == tcell.KeyCtrlR { event = nil i_reload_data(data) @@ -488,6 +491,11 @@ func i_events(data *HardData) { data.opts.GPG = "" } } + case INSERT_MODE: + if event.Key() == tcell.KeyEscape || + event.Key() == tcell.KeyCtrlC { + data.ui.mode = NORMAL_MODE + } case MKDIR_MODE: if event.Key() == tcell.KeyEscape || event.Key() == tcell.KeyCtrlC { |