mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-26 03:35:17 +00:00
shift-delete to only delete from history if cursor at autosuggestion
If there is no history search or autosuggestion, shift-delete acts as backspace, matching native macOS behavior. I'm not sure if we want to keep that amount of overloaded behavior, but let's assume so for now. If that assumption holds, it may be confusing that shift-delete deletes the autosuggestion if the cursor is here echo some command with autosuggstion ^ So let's only do that if the cursor is actually at the autosuggestion, I guess.
This commit is contained in:
parent
f448ddd579
commit
411745ebce
1 changed files with 1 additions and 1 deletions
|
@ -2974,7 +2974,7 @@ impl<'a> Reader<'a> {
|
|||
rl::HistoryPagerDelete => {
|
||||
// Also applies to ordinary history search.
|
||||
let is_history_search = !self.history_search.is_at_end();
|
||||
let is_autosuggestion = self.is_at_line_with_autosuggestion();
|
||||
let is_autosuggestion = self.is_at_autosuggestion();
|
||||
if is_history_search || is_autosuggestion {
|
||||
self.input_data.function_set_status(true);
|
||||
if is_autosuggestion && !self.autosuggestion.is_from_history {
|
||||
|
|
Loading…
Reference in a new issue