Revert "helix-term: allow to backspace out-of the command prompt (#9828)" (#10005)

This reverts commit 0dc67ff885.

See the post-merge discussion in #9828. The old behavior was less
surprising and we have other ways to abort from a prompt, so let's
revert the behavior change.
This commit is contained in:
Michael Davis 2024-03-26 01:49:39 -04:00 committed by GitHub
parent a0d6566140
commit 07e21a10f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}