summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--development.md2
-rw-r--r--src/event_exec.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/development.md b/development.md
index 14ed76d..1d2eb08 100644
--- a/development.md
+++ b/development.md
@@ -607,7 +607,7 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally.
- [ ] avoid multiple refreshs if we edit files ourself
- [ ] Tree remade without recursion. Improve ram usage
- [x] FIX: folders are max depth hangs the app
- - [ ] FIX: rename renames the root path
+ - [x] FIX: rename renames the root path
- [ ] FIX: scrolling to bottom of tree is bugged
- [ ] FIX: scrolling starts 1 row to low
- [ ] search can only find the first match
diff --git a/src/event_exec.rs b/src/event_exec.rs
index 611f896..e725009 100644
--- a/src/event_exec.rs
+++ b/src/event_exec.rs
@@ -1299,7 +1299,7 @@ impl LeaveMode {
/// We only try to rename in the same directory, so it shouldn't be a problem.
/// Filename is sanitized before processing.
pub fn rename(tab: &mut Tab) -> Result<()> {
- let original_path = if let Mode::Tree = tab.mode {
+ let original_path = if let Mode::Tree = tab.previous_mode {
tab.tree.selected_path()
} else {
tab.path_content