From 89ca9abeec6a66491e4a4221696559f605b0fa8a Mon Sep 17 00:00:00 2001 From: Sebastian Witte Date: Fri, 2 Feb 2024 09:22:26 +0100 Subject: [PATCH] Only check for duplicates in suggestions --- src/completion/history.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/completion/history.rs b/src/completion/history.rs index eeaa99e7..095a6375 100644 --- a/src/completion/history.rs +++ b/src/completion/history.rs @@ -28,8 +28,8 @@ impl<'menu> Completer for HistoryCompleter<'menu> { let mut seen_command_lines = HashSet::new(); values .into_iter() - .filter(|value| seen_command_lines.insert(value.command_line.clone())) .map(|value| self.create_suggestion(line, pos, value.command_line.deref())) + .filter(|suggestion| seen_command_lines.insert(suggestion.value.clone())) .collect() }