From a568fb05c9a1893f2b44d1ed6e3e5cd69314a035 Mon Sep 17 00:00:00 2001 From: theteachr Date: Wed, 28 Dec 2022 21:45:00 +0530 Subject: [PATCH] Avoid renaming existing element --- helix-term/src/ui/statusline.rs | 6 +++--- helix-view/src/editor.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index 5fc4e5737224..a25b4540d1f9 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -139,8 +139,8 @@ where match element_id { helix_view::editor::StatusLineElement::Mode => render_mode, helix_view::editor::StatusLineElement::Spinner => render_lsp_spinner, + helix_view::editor::StatusLineElement::FileBaseName => render_file_base_name, helix_view::editor::StatusLineElement::FileName => render_file_name, - helix_view::editor::StatusLineElement::FilePath => render_file_path, helix_view::editor::StatusLineElement::FileEncoding => render_file_encoding, helix_view::editor::StatusLineElement::FileLineEnding => render_file_line_ending, helix_view::editor::StatusLineElement::FileType => render_file_type, @@ -407,7 +407,7 @@ where write(context, format!(" {} ", file_type), None); } -fn render_file_path(context: &mut RenderContext, write: F) +fn render_file_name(context: &mut RenderContext, write: F) where F: Fn(&mut RenderContext, String, Option