diff --git a/yazi-config/preset/keymap.toml b/yazi-config/preset/keymap.toml index f6dc8d1e..3236ebaf 100644 --- a/yazi-config/preset/keymap.toml +++ b/yazi-config/preset/keymap.toml @@ -232,7 +232,7 @@ keymap = [ { on = "", run = "move 999", desc = "Move to the EOL" }, # Delete - { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, { on = "", run = "backspace", desc = "Delete the character before the cursor" }, { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, diff --git a/yazi-core/src/input/commands/backspace.rs b/yazi-core/src/input/commands/backspace.rs index 37b0e5ac..2b88ceb7 100644 --- a/yazi-core/src/input/commands/backspace.rs +++ b/yazi-core/src/input/commands/backspace.rs @@ -16,10 +16,6 @@ impl From for Opt { impl Input { pub fn backspace(&mut self, opt: impl Into) { let snap = self.snaps.current_mut(); - if snap.value.is_empty() { - return self.close(false); - } - let opt = opt.into() as Opt; if !opt.under && snap.cursor < 1 { return;