Skip to content

Commit

Permalink
Revert "helix-term: allow to backspace out-of the command prompt (hel…
Browse files Browse the repository at this point in the history
…ix-editor#9828)" (helix-editor#10005)

This reverts commit 0dc67ff.

See the post-merge discussion in helix-editor#9828. The old behavior was less
surprising and we have other ways to abort from a prompt, so let's
revert the behavior change.
  • Loading branch information
the-mikedavis authored and postsolar committed Apr 4, 2024
1 parent 960ecdd commit b118450
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions helix-term/src/ui/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,6 @@ impl Component for Prompt {
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
ctrl!('h') | key!(Backspace) | shift!(Backspace) => {
if self.line.is_empty() {
(self.callback_fn)(cx, &self.line, PromptEvent::Abort);
return close_fn;
}
self.delete_char_backwards(cx.editor);
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
Expand Down

0 comments on commit b118450

Please sign in to comment.