Remove broken assert

See #12326

I have been able to trigger this pretty reliably, and the simplest fix is
to... just not assert out when we would return anyway.

It doesn't reproduce with `commandline` because it needs the
suggestion to exist, it'll happen when you enter the "n" of "install"
if the suggestion is "İnstall" (i.e. uppercase turkish dotted i)

In general asserts in the reader make for a terrible experience.
This commit is contained in:
Fabian Boehm
2026-01-21 17:23:00 +01:00
parent 53e6758cc3
commit 1d2a5997cc

View File

@@ -5495,11 +5495,6 @@ fn update_autosuggestion(&mut self) {
let el = &self.data.command_line;
let autosuggestion = &self.autosuggestion;
if self.is_at_line_with_autosuggestion() {
assert!(string_prefixes_string_maybe_case_insensitive(
autosuggestion.icase,
&el.text()[autosuggestion.search_string_range.clone()],
&autosuggestion.text
));
return;
}