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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user