From 9ff62bb39b69c75ee15508a7266d45e15c0608a2 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 25 Apr 2024 20:20:20 +0200 Subject: rename go --- src/e_keys.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/e_keys.go') diff --git a/src/e_keys.go b/src/e_keys.go index d160f47..621b9ea 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -240,8 +240,7 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { ui.msg_buff = "pasted " + new_host.Name } else if (event.Rune() == 'c' || event.Rune() == 'C' || - event.Rune() == 'r' || - event.Rune() == 'R') && + event.Rune() == 'A') && data.litems.curr != nil && data.litems.curr.is_dir() == false { ui.mode = RENAME_MODE @@ -780,7 +779,10 @@ func e_rename_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { event.Key() == tcell.KeyCtrlC { data.insert = nil } else if event.Key() == tcell.KeyEnter { - e_rename(data, ui) + if err := e_rename(data, ui); err != nil { + ui.s.HideCursor() + ui.buff = "" + } } else { e_readline(event, &ui.buff) return true -- cgit v1.2.3