diff options
-rw-r--r-- | src/commands/rename_file.rs | 4 | ||||
-rw-r--r-- | src/ui/widgets/tui_textfield.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/rename_file.rs b/src/commands/rename_file.rs index 23ae1fd..5078680 100644 --- a/src/commands/rename_file.rs +++ b/src/commands/rename_file.rs @@ -83,8 +83,8 @@ impl RenameFileAppend { let prefix; let suffix; if let Some(ext) = file_name.rfind('.') { - prefix = format!("rename {}", &file_name[0..ext + 1]); - suffix = String::from(&file_name[ext + 1..]); + prefix = format!("rename {}", &file_name[0..ext]); + suffix = String::from(&file_name[ext..]); } else { prefix = format!("rename {}", file_name); suffix = String::new(); diff --git a/src/ui/widgets/tui_textfield.rs b/src/ui/widgets/tui_textfield.rs index e978549..602fa5d 100644 --- a/src/ui/widgets/tui_textfield.rs +++ b/src/ui/widgets/tui_textfield.rs @@ -161,7 +161,7 @@ impl<'a> TuiTextField<'a> { } } Event::Input(Key::Home) => { - line_buffer.move_end(); + line_buffer.move_home(); completion_tracker.take(); } Event::Input(Key::End) => { |