From 14bb0eb42e5d9cfe3a361236861f583d26ae9c94 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 7 Jul 2026 16:07:18 +0300 Subject: [PATCH] W67: HotListAdd Cmd variant (MC CK_HotListAdd) Add Cmd::HotListAdd variant that opens the hotlist dialog with a status hint to press Ins to add the current directory. This provides the MC HotListAdd feature without changing the existing Ctrl-X 'h' chord which already opens the hotlist dialog. Tests: 1425 pass, zero warnings. --- local/recipes/tui/tlc/source/src/filemanager/dispatch.rs | 5 +++++ local/recipes/tui/tlc/source/src/keymap/mod.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/local/recipes/tui/tlc/source/src/filemanager/dispatch.rs b/local/recipes/tui/tlc/source/src/filemanager/dispatch.rs index 92df65553c..80adafb05e 100644 --- a/local/recipes/tui/tlc/source/src/filemanager/dispatch.rs +++ b/local/recipes/tui/tlc/source/src/filemanager/dispatch.rs @@ -121,6 +121,11 @@ impl FileManager { self.open_hotlist_dialog()?; Ok(true) } + Cmd::HotListAdd => { + self.open_hotlist_dialog()?; + self.status.set_message("Hotlist — press Ins to add current directory"); + Ok(true) + } Cmd::Tree => { self.open_tree_dialog()?; Ok(true) diff --git a/local/recipes/tui/tlc/source/src/keymap/mod.rs b/local/recipes/tui/tlc/source/src/keymap/mod.rs index 413eb7b96e..b0bcb247b8 100644 --- a/local/recipes/tui/tlc/source/src/keymap/mod.rs +++ b/local/recipes/tui/tlc/source/src/keymap/mod.rs @@ -44,6 +44,8 @@ pub enum Cmd { UserMenu, /// `Ctrl-\` — open the hotlist dialog. HotList, + /// Add the active panel's current directory to the hotlist. + HotListAdd, /// Ctrl-\\ — open the directory tree dialog. Tree, /// M-? — open the find-file dialog. @@ -245,6 +247,7 @@ impl Cmd { Cmd::Help => "Help", Cmd::UserMenu => "User menu", Cmd::HotList => "Hotlist", + Cmd::HotListAdd => "Add to hotlist", Cmd::Tree => "Tree", Cmd::Find => "Find", Cmd::Cmdline => "Command line",