diff options
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/menu.rs | 2 | ||||
-rw-r--r-- | helix-term/src/ui/prompt.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index 99c2473d..1baaf40a 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -40,7 +40,7 @@ impl Item for PathBuf { type Data = PathBuf; fn label(&self, root_path: &Self::Data) -> Spans { - self.strip_prefix(&root_path) + self.strip_prefix(root_path) .unwrap_or(self) .to_string_lossy() .into() diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index d0991d3c..ca2872a7 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -32,7 +32,7 @@ pub struct Prompt { next_char_handler: Option<PromptCharHandler>, } -#[derive(Clone, Copy, PartialEq)] +#[derive(Clone, Copy, PartialEq, Eq)] pub enum PromptEvent { /// The prompt input has been updated. Update, @@ -408,7 +408,7 @@ impl Prompt { surface.set_stringn( area.x + col * (1 + col_width), area.y + row, - &completion, + completion, col_width.saturating_sub(1) as usize, color, ); |