diff --git a/yazi-config/src/popup/input.rs b/yazi-config/src/popup/input.rs index 348e35e5..83045faa 100644 --- a/yazi-config/src/popup/input.rs +++ b/yazi-config/src/popup/input.rs @@ -58,7 +58,7 @@ impl Input { pub fn create(&self, dir: bool) -> InputOpt { InputOpt { - id: "create".to_owned(), + id: if dir { "create-dir" } else { "create" }.to_owned(), title: self.create_title[dir as usize].clone(), position: Position::new(self.create_origin, self.create_offset), ..Default::default() diff --git a/yazi-fm/src/input/input.rs b/yazi-fm/src/input/input.rs index 84962b41..5c71cc12 100644 --- a/yazi-fm/src/input/input.rs +++ b/yazi-fm/src/input/input.rs @@ -23,6 +23,7 @@ impl<'a> Input<'a> { let (path, mode): (&str, u16) = match input.id.as_str() { "cd" => (input.value(), if is_dir { 0o40755 } else { 0o100644 }), "create" => (input.value(), if is_dir { 0o40755 } else { 0o100644 }), + "create-dir" => (input.value(), 0o40755), "rename-file" => (input.value(), 0o100644), "rename-dir" => (input.value(), 0o40755), "shell" => ("icon.sh", 0o100644), @@ -53,7 +54,7 @@ impl Widget for Input<'_> { .title(Line::styled(&input.title, THEME.input.title.get())); if let Some(i) = self.icon() { - block = block.title_bottom(Line::raw(format!("{} ", i.text)).style(i.style).right_aligned()); + block = block.title_bottom(Line::raw(i.text).style(i.style).right_aligned()); } block.render(outer, buf);