From 4ae3c487a6497ed0a500e62a4bbe985121c2567e Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Thu, 30 Jan 2025 16:24:35 +0100 Subject: [PATCH] reader: flash entire commandline if there's no completion This is often the case if the token is empty, e.g `git add ` outside of a git repo. --- src/reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.rs b/src/reader.rs index 5ac04e773..47c8ca058 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -6342,7 +6342,7 @@ fn handle_completions(&mut self, token_range: Range) -> bool { let len = comp.len(); if len == 0 { // No suitable completions found, flash screen and return. - self.flash(token_range); + self.flash(0..self.command_line.len()); return false; } else if len == 1 { // Exactly one suitable completion found - insert it.