mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
reader: only flash entire commandline if token is empty
So `git add dsfiojdsoif<TAB>` flashes the token, `git add <TAB>` flashes the entire commandline because there is no token to flash
This commit is contained in:
@@ -6342,7 +6342,11 @@ fn handle_completions(&mut self, token_range: Range<usize>) -> bool {
|
||||
let len = comp.len();
|
||||
if len == 0 {
|
||||
// No suitable completions found, flash screen and return.
|
||||
self.flash(0..self.command_line.len());
|
||||
if token_range.is_empty() {
|
||||
self.flash(0..self.command_line.len());
|
||||
} else {
|
||||
self.flash(token_range);
|
||||
}
|
||||
return false;
|
||||
} else if len == 1 {
|
||||
// Exactly one suitable completion found - insert it.
|
||||
|
||||
Reference in New Issue
Block a user