aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-05-24 17:17:04 +0200
committerJoe <rbo@gmx.us>2024-05-24 17:17:04 +0200
commited4e510c23af4b9ebfba31a99111f9590887b34b (patch)
treec1eecdca8899ef9108cd425e4b440a640a30affc
parenthere (diff)
downloadhardflip-ed4e510c23af4b9ebfba31a99111f9590887b34b.tar.gz
hardflip-ed4e510c23af4b9ebfba31a99111f9590887b34b.tar.bz2
hardflip-ed4e510c23af4b9ebfba31a99111f9590887b34b.tar.xz
hardflip-ed4e510c23af4b9ebfba31a99111f9590887b34b.tar.zst
hardflip-ed4e510c23af4b9ebfba31a99111f9590887b34b.zip
go
-rw-r--r--src/c_defs.go1
-rw-r--r--src/e_keys.go13
2 files changed, 10 insertions, 4 deletions
diff --git a/src/c_defs.go b/src/c_defs.go
index 94cf59f..f4cbcbf 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -79,6 +79,7 @@ const (
ERROR_MODE
WELCOME_MODE
MKDIR_MODE
+ INSERT_NAME_MODE
INSERT_MODE
RENAME_MODE
HELP_MODE
diff --git a/src/e_keys.go b/src/e_keys.go
index 8c74be3..5edf929 100644
--- a/src/e_keys.go
+++ b/src/e_keys.go
@@ -177,13 +177,14 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
ui.insert_sel_ok = false
ui.insert_scroll = 0
tmp := ItemsNode{}
- tmp_host := HostNode{}
- tmp.Host = &tmp_host
+ data.insert = &HostNode{}
+ tmp.Host = data.insert
if data.litems.curr.is_dir() == true {
- tmp_host.parent = data.litems.curr.Dirs
+ data.insert.parent = data.litems.curr.Dirs
} else {
- tmp_host.parent = data.litems.curr.Host.parent
+ data.insert.parent = data.litems.curr.Host.parent
}
+ e_set_protocol_defaults(data, data.insert)
data.litems.add_after(&tmp)
} else if event.Rune() == 'e' &&
data.litems.curr != nil &&
@@ -353,6 +354,10 @@ func e_mkdir_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
return false
}
+func e_insert_name_events(data *HardData, ui *HardUI,
+ event tcell.EventKey) bool {
+}
+
func e_insert_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
if data.insert == nil {
if event.Key() == tcell.KeyEscape ||