diff options
author | Joe <rbo@gmx.us> | 2024-05-13 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-13 20:20:20 +0200 |
commit | 0ddfbf62fde8b8e0bde9a548b203d67b812ab61e (patch) | |
tree | 9843ed6d3420f1295e2b30355cfa743d4fa62202 /src/e_keys.go | |
parent | gg (diff) | |
download | hardflip-0ddfbf62fde8b8e0bde9a548b203d67b812ab61e.tar.gz hardflip-0ddfbf62fde8b8e0bde9a548b203d67b812ab61e.tar.bz2 hardflip-0ddfbf62fde8b8e0bde9a548b203d67b812ab61e.tar.xz hardflip-0ddfbf62fde8b8e0bde9a548b203d67b812ab61e.tar.zst hardflip-0ddfbf62fde8b8e0bde9a548b203d67b812ab61e.zip |
fix
Diffstat (limited to 'src/e_keys.go')
-rw-r--r-- | src/e_keys.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/e_keys.go b/src/e_keys.go index 3fe9d6c..2d05380 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -242,10 +242,13 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { } else if (event.Rune() == 'c' || event.Rune() == 'C' || event.Rune() == 'A') && - data.litems.curr != nil && - data.litems.curr.is_dir() == false { + data.litems.curr != nil { ui.mode = RENAME_MODE - ui.buff = data.litems.curr.Host.Name + if data.litems.curr.is_dir() == false { + ui.buff = data.litems.curr.Host.Name + } else { + ui.buff = data.litems.curr.Dirs.Name + } } else if event.Rune() == '?' { ui.mode = HELP_MODE ui.help_scroll = 0 @@ -821,6 +824,7 @@ func e_rename_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { if err := e_rename(data, ui); err != nil { ui.s.HideCursor() ui.buff = "" + return true } } else { e_readline(event, &ui.buff) |