From 98eaef27785beace549e4b33fe8ac537f74a171a Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 22 Jan 2026 15:08:13 +0100 Subject: [PATCH] reader: remove obsolete workaround We no longer use libc's locale-aware tolower etc. --- src/reader/history_search.rs | 11 ++--------- tests/checks/tmux-history-search.fish | 5 +++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/reader/history_search.rs b/src/reader/history_search.rs index 78f474d77..02cc8d09a 100644 --- a/src/reader/history_search.rs +++ b/src/reader/history_search.rs @@ -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); diff --git a/tests/checks/tmux-history-search.fish b/tests/checks/tmux-history-search.fish index 1b044b5cd..24ee26844 100644 --- a/tests/checks/tmux-history-search.fish +++ b/tests/checks/tmux-history-search.fish @@ -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+}}> : Ö