From 72ee87d8c097449a315b476f0b359ae6c44c26cf Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 25 Apr 2024 20:20:20 +0200 Subject: wo edit was fast --- src/e_keys.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/e_keys.go') diff --git a/src/e_keys.go b/src/e_keys.go index ee6c66e..990e7a2 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/e_keys.go - * Wed Apr 24 18:07:00 2024 + * Thu Apr 25 11:42:12 2024 * Joe * * events in the keys @@ -174,6 +174,15 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { ui.mode = INSERT_MODE ui.insert_sel = 0 ui.insert_sel_ok = false + } else if event.Rune() == 'e' && + data.litems.curr != nil && + data.litems.curr.is_dir() == false { + tmp := e_deep_copy_host(data.litems.curr.Host) + data.insert = &tmp + e_set_protocol_max(data, data.insert) + ui.mode = INSERT_MODE + ui.insert_sel = 0 + ui.insert_sel_ok = false } else if event.Key() == tcell.KeyCtrlR { e_reload_data(data) } else if event.Rune() == 'm' || -- cgit v1.2.3