diff options
author | Gokul Soumya | 2022-01-06 05:56:35 +0000 |
---|---|---|
committer | Gokul Soumya | 2022-01-06 06:02:03 +0000 |
commit | 449624965b05fd2abc9e3ba2f791f8de8b1eeb3e (patch) | |
tree | cbe060df6a61330e6a470c521ed254f5c7dc4f4f /helix-term/src/ui/prompt.rs | |
parent | c0bbadcaaf42698d102fa03f6f9267021f3efec0 (diff) | |
parent | 2e02a1d6bc004212033b9c4e5ed0de0fd880796c (diff) |
Merge branch 'master' into cursor-shape-new
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 07e1b33c..0202de23 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -127,7 +127,7 @@ impl Prompt { let mut char_position = char_indices .iter() .position(|(idx, _)| *idx == self.cursor) - .unwrap_or_else(|| char_indices.len()); + .unwrap_or(char_indices.len()); for _ in 0..rep { // Skip any non-whitespace characters @@ -473,7 +473,7 @@ impl Component for Prompt { } } key!(Enter) => { - if self.selection.is_some() && self.line.ends_with('/') { + if self.selection.is_some() && self.line.ends_with(std::path::MAIN_SEPARATOR) { self.completion = (self.completion_fn)(&self.line); self.exit_selection(); } else { |