Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/picker/query.rs')
-rw-r--r--helix-term/src/ui/picker/query.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/helix-term/src/ui/picker/query.rs b/helix-term/src/ui/picker/query.rs
index 005ddee4..e433a11f 100644
--- a/helix-term/src/ui/picker/query.rs
+++ b/helix-term/src/ui/picker/query.rs
@@ -58,16 +58,11 @@ impl PickerQuery {
() => {
let key = field.take().unwrap_or(primary_field);
- // Trims one space from the end, enabling leading and trailing
- // spaces in search patterns, while also retaining spaces as separators
- // between column filters.
- let pat = text.strip_suffix(' ').unwrap_or(&text);
-
if let Some(pattern) = fields.get_mut(key) {
pattern.push(' ');
- pattern.push_str(pat);
+ pattern.push_str(text.trim());
} else {
- fields.insert(key.clone(), pat.to_string());
+ fields.insert(key.clone(), text.trim().to_string());
}
text.clear();
};