reader: remove obsolete workaround

We no longer use libc's locale-aware tolower etc.
This commit is contained in:
Johannes Altmanninger
2026-01-22 15:08:13 +01:00
parent 78f4541116
commit 98eaef2778
2 changed files with 7 additions and 9 deletions

View File

@@ -219,15 +219,8 @@ fn append_matches_from_search(&mut self) -> bool {
let text = self.search().current_string();
let needle = self.search_string();
if matches!(self.mode, SearchMode::Line | SearchMode::Prefix) {
// FIXME: Previous versions asserted out if this wasn't true.
// This could be hit with a needle of "ö" and haystack of "echo Ö"
// I'm not sure why - this points to a bug in ifind (probably wrong locale?)
// However, because the user experience of having it crash is horrible,
// and the worst thing that can otherwise happen here is that a search is unsuccessful,
// we just check it instead.
if let Some(offset) = find(text, needle) {
self.add_if_new(SearchMatch::new(text.to_owned(), offset));
}
let offset = find(text, needle).unwrap();
self.add_if_new(SearchMatch::new(text.to_owned(), offset));
} else if matches!(self.mode, SearchMode::Token | SearchMode::LastToken) {
let mut tok = Tokenizer::new(text, TOK_ACCEPT_UNFINISHED);

View File

@@ -71,3 +71,8 @@ tmux-sleep
isolated-tmux capture-pane -p | grep "^foo\|prompt 7>"
# CHECK: foo
# CHECK: prompt 7>
isolated-tmux send-keys C-c ": Ö" Enter C-l ö C-p
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt {{\d+}}> : Ö