diff options
author | qkzk <qu3nt1n@gmail.com> | 2024-11-12 21:38:05 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2024-11-12 21:38:05 +0100 |
commit | 7e34aaaacbba0ebc89bd3e73365a5269b52d78eb (patch) | |
tree | 5a21c538feee928498fd67dd0f6feb689120289b | |
parent | 0e0807f415a7cc6716853d0218ae04b698188bcd (diff) |
temporary marks
-rw-r--r-- | development.md | 4 | ||||
-rw-r--r-- | src/app/status.rs | 34 | ||||
-rw-r--r-- | src/config/keybindings.rs | 7 | ||||
-rw-r--r-- | src/event/action_map.rs | 10 | ||||
-rw-r--r-- | src/event/event_action.rs | 37 | ||||
-rw-r--r-- | src/event/event_dispatch.rs | 5 | ||||
-rw-r--r-- | src/io/display.rs | 6 | ||||
-rw-r--r-- | src/modes/menu/help.rs | 2 | ||||
-rw-r--r-- | src/modes/menu/mod.rs | 2 | ||||
-rw-r--r-- | src/modes/menu/temp_marks.rs | 104 | ||||
-rw-r--r-- | src/modes/mode.rs | 4 | ||||
-rw-r--r-- | src/modes/utils/leave_menu.rs | 36 | ||||
-rw-r--r-- | src/modes/utils/menu_holder.rs | 7 | ||||
-rw-r--r-- | src/modes/utils/second_line.rs | 5 |
14 files changed, 253 insertions, 10 deletions
diff --git a/development.md b/development.md index ab66ebc1..c4b3afbf 100644 --- a/development.md +++ b/development.md @@ -1428,6 +1428,8 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. It's the same as `!`, `some_command <Ctrl+v>` - chmod improvment. Enter "chmod" mode with "+" or "alt+m" - you can type a permission in octal mode (like 640), litterally (like rwxrwxrwx) or like in chmod "a+x", "-w" etc. +- Temporary marks. Use Char(") and Alt+" to jump and save. Only 10 are saved so we can index with the digits. + Those marks aren't saved on disk and are dropped when the application stops. #### Changelog @@ -1527,6 +1529,7 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [x] Case insensitive search - [x] FIX --keybinds has wrong display, keybinds should be shortened. - [x] FIX: leaving dual mode does't hide ueberzug +- [x] temporary marks: very similar to usual marks. We only use digits and save 10 marks at most. They are dropped when the application quits. ## TODO @@ -1549,7 +1552,6 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - https://github.com/KillTheMule/nvim-rs/blob/master/examples/basic.rs - https://neovim.io/doc/user/api.html -- [ ] temporary marks - [ ] context switch - [ ] read events from stdin ? can't be done from tuikit. Would require another thread ? - [ ] pushbullet ? diff --git a/src/app/status.rs b/src/app/status.rs index a97f9cd0..25832b9e 100644 --- a/src/app/status.rs +++ b/src/app/status.rs @@ -1493,6 +1493,38 @@ impl Status { self.refresh_status() } + /// Execute a new temp mark, saving it temporary for futher use. + pub fn temp_marks_new(&mut self, c: char) -> Result<()> { + let Some(index) = c.to_digit(10) else { + return Ok(()); + }; + let path = self.current_tab_mut().directory.path.to_path_buf(); + self.menu.temp_marks.set_mark(index as _, path); + self.current_tab_mut().refresh_view()?; + self.reset_menu_mode()?; + self.refresh_status() + } + + /// Erase the current mark + pub fn temp_marks_erase(&mut self) -> Result<()> { + self.menu.temp_marks.erase_current_mark(); + Ok(()) + } + + /// Execute a jump to a temporay mark, moving to a valid path. + /// If the saved path is invalid, it does nothing but reset the view. + pub fn temp_marks_jump_char(&mut self, c: char) -> Result<()> { + let Some(index) = c.to_digit(10) else { + return Ok(()); + }; + if let Some(path) = self.menu.temp_marks.get_mark(index as _) { + self.tabs[self.index].cd(path)?; + } + self.current_tab_mut().refresh_view()?; + self.reset_menu_mode()?; + self.refresh_status() + } + /// Recursively delete all flagged files. pub fn confirm_delete_files(&mut self) -> Result<()> { self.menu.delete_flagged_files()?; @@ -1690,7 +1722,7 @@ impl Status { return Ok(()); } let input_permission = &self.menu.input.string(); - Permissions::set_permissions_of_flagged(input_permission, &mut self.menu.flagged)?; + Permissions::set_permissions_of_flagged(input_permission, &self.menu.flagged)?; self.reset_tabs_view() } diff --git a/src/config/keybindings.rs b/src/config/keybindings.rs index 51ca2430..047faaea 100644 --- a/src/config/keybindings.rs +++ b/src/config/keybindings.rs @@ -251,6 +251,7 @@ impl Bindings { (KeyEvent::new(KeyCode::Char('/'), KeyModifiers::NONE), ActionMap::Search), (KeyEvent::new(KeyCode::Char('*'), KeyModifiers::NONE), ActionMap::FlagAll), (KeyEvent::new(KeyCode::Char('\''), KeyModifiers::NONE), ActionMap::MarksJump), + (KeyEvent::new(KeyCode::Char('"'), KeyModifiers::NONE), ActionMap::TempMarksJump), (KeyEvent::new(KeyCode::Char('-'), KeyModifiers::NONE), ActionMap::Back), (KeyEvent::new(KeyCode::Char('~'), KeyModifiers::NONE), ActionMap::Home), (KeyEvent::new(KeyCode::Char('`'), KeyModifiers::NONE), ActionMap::GoRoot), @@ -309,13 +310,15 @@ impl Bindings { (KeyEvent::new(KeyCode::Char('h'), KeyModifiers::ALT), ActionMap::Help), (KeyEvent::new(KeyCode::Char('i'), KeyModifiers::ALT), ActionMap::CliMenu), (KeyEvent::new(KeyCode::Char('l'), KeyModifiers::ALT), ActionMap::Log), + (KeyEvent::new(KeyCode::Char('m'), KeyModifiers::ALT), ActionMap::Chmod), (KeyEvent::new(KeyCode::Char('o'), KeyModifiers::ALT), ActionMap::TrashOpen), + (KeyEvent::new(KeyCode::Char('p'), KeyModifiers::ALT), ActionMap::TogglePreviewSecond), (KeyEvent::new(KeyCode::Char('r'), KeyModifiers::ALT), ActionMap::RemoteMount), (KeyEvent::new(KeyCode::Char('s'), KeyModifiers::ALT), ActionMap::TuiMenu), (KeyEvent::new(KeyCode::Char('t'), KeyModifiers::ALT), ActionMap::Context), (KeyEvent::new(KeyCode::Char('x'), KeyModifiers::ALT), ActionMap::TrashEmpty), - (KeyEvent::new(KeyCode::Char('m'), KeyModifiers::ALT), ActionMap::Chmod), - (KeyEvent::new(KeyCode::Char('p'), KeyModifiers::ALT), ActionMap::TogglePreviewSecond), + (KeyEvent::new(KeyCode::Char('"'), KeyModifiers::ALT), ActionMap::TempMarksNew), + (KeyEvent::new(KeyCode::Char('\''), KeyModifiers::ALT), ActionMap::MarksNew), (KeyEvent::new(KeyCode::Char('c'), KeyModifiers::ALT | KeyModifiers::SHIFT), ActionMap::CloudDrive), (KeyEvent::new(KeyCode::Char('r'), KeyModifiers::ALT | KeyModifiers::SHIFT), ActionMap::RemovableDevices), diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 0c51dd4a..9b0aae6c 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -84,6 +84,8 @@ pub enum ActionMap { SearchNext, Shell, ShellCommand, + TempMarksJump, + TempMarksNew, TuiMenu, Shortcut, Sort, @@ -187,6 +189,8 @@ impl ActionMap { Self::Symlink => EventAction::symlink(status), Self::SyncLTR => EventAction::sync_ltr(status), Self::Tab => EventAction::tab(status), + Self::TempMarksJump => EventAction::temp_marks_jump(status), + Self::TempMarksNew => EventAction::temp_marks_new(status), Self::ToggleDisplayFull => EventAction::toggle_display_full(status), Self::ToggleDualPane => EventAction::toggle_dualpane(status), Self::ToggleFlag => EventAction::toggle_flag(status), @@ -250,8 +254,8 @@ impl ActionMap { Self::Home => "move to $HOME", Self::KeyHome => "go to first line", Self::Log => "open the logs", - Self::MarksJump => "jump to a mark", - Self::MarksNew => "mark current path", + Self::MarksJump => "MARKS: Jump", + Self::MarksNew => "MARKS: Save", Self::MoveDown => "one line down", Self::MoveLeft => "cd to parent directory ", Self::MoveRight => "cd to child directory", @@ -298,6 +302,8 @@ impl ActionMap { Self::Sort => "SORT", Self::Symlink => "symlink to current dir", Self::SyncLTR => "Sync right tab from left tab path", + Self::TempMarksJump => "TEMP MARKS: Jump", + Self::TempMarksNew => "TEMP MARKS: Save", Self::Tab => "cycle tab", Self::ToggleDisplayFull => "toggle full metadata display of files", Self::ToggleDualPane => "toggle dual pane - if the width is sufficiant", diff --git a/src/event/event_action.rs b/src/event/event_action.rs index 40259232..86a95e1a 100644 --- a/src/event/event_action.rs +++ b/src/event/event_action.rs @@ -692,6 +692,38 @@ impl EventAction { Ok(()) } + /// Enter TempMarks jump mode, allowing to jump to a marked file. + pub fn temp_marks_jump(status: &mut Status) -> Result<()> { + if matches!( + status.current_tab().menu_mode, + Menu::Navigate(Navigate::TempMarks(MarkAction::Jump)) + ) { + status.reset_menu_mode()?; + } else { + status.set_menu_mode( + status.index, + Menu::Navigate(Navigate::TempMarks(MarkAction::Jump)), + )?; + } + Ok(()) + } + + /// Enter TempMarks new mode, allowing to bind a char to a path. + pub fn temp_marks_new(status: &mut Status) -> Result<()> { + if matches!( + status.current_tab().menu_mode, + Menu::Navigate(Navigate::TempMarks(MarkAction::New)) + ) { + status.reset_menu_mode()?; + } else { + status.set_menu_mode( + status.index, + Menu::Navigate(Navigate::TempMarks(MarkAction::New)), + )?; + } + Ok(()) + } + /// Enter the shortcut mode, allowing to visit predefined shortcuts. /// Basic folders (/, /dev... $HOME) and mount points (even impossible to /// visit ones) are proposed. @@ -992,9 +1024,12 @@ impl EventAction { return Ok(()); } match status.current_tab().menu_mode { - Menu::Navigate(Navigate::Marks(MarkAction::New)) => { + Menu::Navigate(Navigate::Marks(_)) => { status.menu.marks.remove_selected()?; } + Menu::Navigate(Navigate::TempMarks(_)) => { + status.menu.temp_marks.erase_current_mark(); + } Menu::InputSimple(_) | Menu::InputCompleted(_) => { status.menu.input.delete_char_left(); } diff --git a/src/event/event_dispatch.rs b/src/event/event_dispatch.rs index 649d7d55..c7c2f4cb 100644 --- a/src/event/event_dispatch.rs +++ b/src/event/event_dispatch.rs @@ -174,6 +174,11 @@ impl EventDispatcher { Navigate::Marks(MarkAction::Jump) => status.marks_jump_char(c), Navigate::Marks(MarkAction::New) => status.marks_new(c), + Navigate::TempMarks(MarkAction::Jump) if c.is_ascii_digit() => { + status.temp_marks_jump_char(c) + } + Navigate::TempMarks(MarkAction::New) if c.is_ascii_digit() => status.temp_marks_new(c), + Navigate::Shortcut if status.menu.shortcut_from_char(c) => { LeaveMenu::leave_menu(status, &self.binds) } diff --git a/src/io/display.rs b/src/io/display.rs index b4d53a1b..2f65373e 100644 --- a/src/io/display.rs +++ b/src/io/display.rs @@ -1042,6 +1042,7 @@ impl<'a> Menu<'a> { match navigate { Navigate::Cloud => self.cloud(f, rect), Navigate::Context => self.context(f, rect), + Navigate::TempMarks(_) => self.temp_marks(f, rect), Navigate::Flagged => self.flagged(f, rect), Navigate::History => self.history(f, rect), Navigate::Picker => self.picker(f, rect), @@ -1120,6 +1121,11 @@ impl<'a> Menu<'a> { } } + fn temp_marks(&self, f: &mut Frame, rect: &Rect) { + let selectable = &self.status.menu.temp_marks; + selectable.draw_menu(f, rect, &self.status.menu.window); + } + fn context(&self, f: &mut Frame, rect: &Rect) { self.context_selectable(f, rect); self.context_more_infos(f, rect) diff --git a/src/modes/menu/help.rs b/src/modes/menu/help.rs index 32c22b7d..3b966f3d 100644 --- a/src/modes/menu/help.rs +++ b/src/modes/menu/help.rs @@ -118,6 +118,8 @@ Different modes for the bottom window GoStart, MarksNew, MarksJump, + TempMarksNew, + TempMarksJump, SearchNext, FuzzyFind, FuzzyFindLine, diff --git a/src/modes/menu/mod.rs b/src/modes/menu/mod.rs index 824c41e0..29e63f79 100644 --- a/src/modes/menu/mod.rs +++ b/src/modes/menu/mod.rs @@ -24,6 +24,7 @@ mod removable_devices; mod search; mod shortcut; mod sort; +mod temp_marks; mod trash; mod tui_menu; @@ -55,5 +56,6 @@ pub use removable_devices::RemovableDevices; pub use search::Search; pub use shortcut::Shortcut; pub use sort::SortKind; +pub use temp_marks::*; pub use trash::Trash; pub use tui_menu::{open_tui_program, TuiApplications}; diff --git a/src/modes/menu/temp_marks.rs b/src/modes/menu/temp_marks.rs new file mode 100644 index 00000000..7cb04b8e --- /dev/null +++ b/src/modes/menu/temp_marks.rs @@ -0,0 +1,104 @@ +use std::{cmp::min, path::PathBuf}; + +use ratatui::{ + layout::Rect, + style::Color, + text::Line, + widgets::{Paragraph, Widget}, + Frame, +}; + +use crate::io::{color_to_style, CowStr, Offseted}; +use crate::modes::ContentWindow; +use crate::{colored_skip_take, impl_content, impl_selectable}; +use crate::config::{ColorG, Gradient, MENU_STYLES}; +use crate::log_info; + +/// Temporary marks are saved in memory and reset when the application quit. +/// +/// We save a fixed size vector of pathbufs. +/// The user can set a mark (default bind alt+") and jump to it (default bind "). +pub struct TempMarks { + content: Vec<Option<PathBuf>>, + pub index: usize, +} + +impl Default for TempMarks { + fn default() -> Self { + let content = vec![None; Self::NB_TEMP_MARKS]; + let index = 0; + Self { content, index } + } +} + +impl TempMarks { + const NB_TEMP_MARKS: usize = 10; + + fn log_index_error(index: usize) { + log_info!( + "index {index} is too big for a temp mark. Should be between 0 and {NB_TEMP_MARKS} exclusive", + NB_TEMP_MARKS=Self::NB_TEMP_MARKS + ); + } + + /// Set the mark at given index to the given path. + pub fn set_mark(&mut self, index: usize, path: PathBuf) { + if index >= Self::NB_TEMP_MARKS { + Self::log_index_error(index); + return; + } + self.content[index] = Some(path); + } + + /// Reset the selected mark to `None` + pub fn erase_current_mark(&mut self) { + self.content[self.index] = None; + } + + /// Get the indexed mark. `None` if the mark isn't set. + pub fn get_mark(&self, index: usize) -> &Option<PathBuf> { + if index >= Self::NB_TEMP_MARKS { + Self::log_index_error(index); + return &None; + } + &self.content[index] + } + + /// False since there's always 10 marks. Some may be None. + pub const fn is_empty(&self) -> bool { + false + } + + /// Returns 10. + pub const fn len(&self) -> usize { + Self::NB_TEMP_MARKS + } + + /// Render the marks on the screen. + /// Can't use the common trait nor the macro since `Option<PathBuf>` doesn't implement `CowStr`. + pub fn draw_menu(&self, f: &mut Frame, rect: &Rect, window: &ContentWindow) { + let mut p_rect = rect.offseted(2, 3); + p_rect.height = p_rect.height.saturating_sub(2); + let content = self.content(); + let lines: Vec<_> = colored_skip_take!(content, window) + .filter(|(index, _, _)| { + (*index) as u16 + ContentWindow::WINDOW_MARGIN_TOP_U16 + 1 - window.top as u16 + 2 + <= rect.height + }) + .map(|(index, opt_path, style)| { + let content = if let Some(path) = opt_path { + format!("{index} {p}", p = path.cow_str()) + } else { + format!("{index} ") + }; + Line::styled(content, self.style(index, &style)) + }) + .collect(); + Paragraph::new(lines).render(p_rect, f.buffer_mut()); + } +} + +type Opb = Option<PathBuf>; + +impl_selectable!(TempMarks); +impl_content!(Opb, TempMarks); diff --git a/src/modes/mode.rs b/src/modes/mode.rs index 0e051c89..a5468edc 100644 --- a/src/modes/mode.rs +++ b/src/modes/mode.rs @@ -215,6 +215,8 @@ pub enum Navigate { RemovableDevices, /// Edit a mark or cd to it Marks(MarkAction), + /// Edit a temporary mark or cd to it + TempMarks(MarkAction), /// Pick a compression method Compress, /// Shell menu applications. Start a new shell with this application. @@ -235,6 +237,7 @@ impl fmt::Display for Navigate { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { Self::Marks(_) => write!(f, "Marks jump:"), + Self::TempMarks(_) => write!(f, "Temp marks jump:"), Self::History => write!(f, "History :"), Self::Shortcut => write!(f, "Shortcut :"), Self::Trash => write!(f, "Trash :"), @@ -346,6 +349,7 @@ impl Menu { Self::InputSimple(_) => "shift+⬆️, shift+⬇️: previous entries, shift+⬅️: erase line. Enter: validate", Self::Navigate(Navigate::Marks(MarkAction::Jump)) => "Type the mark letter to jump there. up, down to navigate, ENTER to select an element", Self::Navigate(Navigate::Marks(MarkAction::New)) => "Type the mark set a mark here. up, down to navigate, ENTER to select an element", + Self::Navigate(Navigate::TempMarks(MarkAction::New)) => "Type the mark set a mark here. up, down to navigate, ENTER to select an element", Self::Navigate(Navigate::Cloud) => "l: leave drive, arrows: navigation, Enter: enter dir / download file, d: new dir, x: delete selected, u: upload local file", Self::Navigate(Navigate::Flagged) => "Up, Down: navigate, Enter / j: jump to this file, x: remove from flagged, u: clear", Self::Navigate(Navigate::Trash) => "Up, Down: navigate.", diff --git a/src/modes/utils/leave_menu.rs b/src/modes/utils/leave_menu.rs index ea23fc0f..f94d4b12 100644 --- a/src/modes/utils/leave_menu.rs +++ b/src/modes/utils/leave_menu.rs @@ -55,6 +55,8 @@ impl LeaveMenu { Menu::Navigate(Navigate::EncryptedDrive) => LeaveMenu::go_to_mount(status), Menu::Navigate(Navigate::Marks(MarkAction::New)) => LeaveMenu::marks_update(status), Menu::Navigate(Navigate::Marks(MarkAction::Jump)) => LeaveMenu::marks_jump(status), + Menu::Navigate(Navigate::TempMarks(MarkAction::New)) => LeaveMenu::tempmark_upd(status), + Menu::Navigate(Navigate::TempMarks(MarkAction::Jump)) => LeaveMenu::tempmark_jp(status), Menu::Navigate(Navigate::Compress) => LeaveMenu::compress(status), Menu::Navigate(Navigate::Context) => LeaveMenu::context(status, binds), Menu::Navigate(Navigate::RemovableDevices) => LeaveMenu::go_to_mount(status), @@ -122,6 +124,40 @@ impl LeaveMenu { Ok(()) } + /// Update the selected mark with the current path. + /// Doesn't change its char. + /// If it doesn't fail, a new pair will be set with (oldchar, new path). + fn tempmark_upd(status: &mut Status) -> Result<()> { + let index = status.menu.temp_marks.index; + let len = status.current_tab().directory.content.len(); + let new_path = &status.tabs[status.index].directory.path; + status + .menu + .temp_marks + .set_mark(index as _, new_path.to_path_buf()); + log_line!("Saved temp mark {index} -> {p}", p = new_path.display()); + status.current_tab_mut().window.reset(len); + status.menu.input.reset(); + Ok(()) + } + + /// Jump to the current mark. + fn tempmark_jp(status: &mut Status) -> Result<()> { + let Some(opt_path) = &status.menu.temp_marks.selected() else { + log_info!("no selected temp mark"); + return Ok(()); + }; + let Some(path) = opt_path else { + return Ok(()); + }; + let len = status.current_tab().directory.content.len(); + status.tabs[status.index].cd(path)?; + status.current_tab_mut().window.reset(len); + status.menu.input.reset(); + + status.update_second_pane_for_preview() + } + /// Execute a shell command picked from the tui_applications menu. /// It will be run an a spawned terminal fn tui_application(status: &mut Status) -> Result<()> { diff --git a/src/modes/utils/menu_holder.rs b/src/modes/utils/menu_holder.rs index a42626b9..4310e2ff 100644 --- a/src/modes/utils/menu_holder.rs +++ b/src/modes/utils/menu_holder.rs @@ -17,7 +17,7 @@ use crate::modes::{ Bulk, CliApplications, Completion, Compresser, Content, ContentWindow, ContextMenu, CryptoDeviceOpener, Flagged, History, Input, InputCompleted, IsoDevice, Marks, Menu, MountCommands, Navigate, PasswordHolder, Picker, Remote, RemovableDevices, Selectable, - Shortcut, Trash, TuiApplications, MAX_MODE, + Shortcut, TempMarks, Trash, TuiApplications, MAX_MODE, }; /// Holds almost every menu except for the history, which is tab specific. @@ -57,6 +57,8 @@ pub struct MenuHolder { pub iso_device: Option<IsoDevice>, /// Marks allows you to jump to a save mark pub marks: Marks, + /// Temporary marks allows you to jump to a save mark + pub temp_marks: TempMarks, /// Hold password between their typing and usage pub password_holder: PasswordHolder, /// basic picker @@ -100,6 +102,7 @@ impl MenuHolder { removable_devices: RemovableDevices::default(), shortcut: Shortcut::empty(start_dir), sudo_command: None, + temp_marks: TempMarks::default(), trash: Trash::new(binds)?, tui_applications: TuiApplications::default(), window: ContentWindow::default(), @@ -347,6 +350,7 @@ impl MenuHolder { Navigate::EncryptedDrive => func(&mut self.encrypted_devices), Navigate::History => func(&mut self.history), Navigate::Marks(_) => func(&mut self.marks), + Navigate::TempMarks(_) => func(&mut self.temp_marks), Navigate::RemovableDevices => func(&mut self.removable_devices), Navigate::Shortcut => func(&mut self.shortcut), Navigate::Trash => func(&mut self.trash), @@ -368,6 +372,7 @@ impl MenuHolder { Navigate::EncryptedDrive => func(&self.encrypted_devices), Navigate::History => func(&self.history), Navigate::Marks(_) => func(&self.marks), + Navigate::TempMarks(_) => func(&self.temp_marks), Navigate::RemovableDevices => func(&self.removable_devices), Navigate::Shortcut => func(&self.shortcut), Navigate::Trash => func(&self.trash), diff --git a/src/modes/utils/second_line.rs b/src/modes/utils/second_line.rs index cc5f14cf..b44def69 100644 --- a/src/modes/utils/second_line.rs +++ b/src/modes/utils/second_line.rs @@ -26,6 +26,7 @@ impl SecondLine for Navigate { Self::Shortcut => "Pick a destination", Self::Compress => "Archive and compress the flagged files using selected algorithm.", Self::Marks(mark_action) => mark_action.second_line(), + Self::TempMarks(mark_action) => mark_action.second_line(), Self::Context => "Pick an action", Self::EncryptedDrive => "m: mount -- u: unmount -- g: go to mount point", Self::TuiApplication => "Pick a command", @@ -41,9 +42,9 @@ impl SecondLine for Navigate { impl SecondLine for MarkAction { fn second_line(&self) -> &'static str { match self { - Self::Jump => "Select a mark to go to or type its char", + Self::Jump => "Select a mark to go to or type its symbol. <Backspace> erases the mark", Self::New => { - "Select a mark or type its char to update it. <Backspace> erase the selected mark" + "Select a mark or type its char to update it. <Backspace> erases mark" } } } |