diff --git a/local/recipes/tui/tlc/source/src/editor/menubar.rs b/local/recipes/tui/tlc/source/src/editor/menubar.rs index 660d004c63..0900691449 100644 --- a/local/recipes/tui/tlc/source/src/editor/menubar.rs +++ b/local/recipes/tui/tlc/source/src/editor/menubar.rs @@ -99,6 +99,10 @@ pub enum EditorCmd { WordComplete, /// Check spelling of the word at cursor (MC CK_SpellCheck). SpellCheck, + /// Save current editor settings as default (MC CK_OptionsSaveMode). + SaveSettings, + /// Redraw the screen (MC CK_Refresh). + Refresh, } /// Outcome of a menu-bar key press. @@ -277,6 +281,8 @@ impl EditorMenuBar { MenuItem::separator(), MenuItem::item("Insert/Overwrite", 'i', EditorCmd::ToggleOverwrite), MenuItem::item("Spell check", 's', EditorCmd::SpellCheck), + MenuItem::separator(), + MenuItem::item("Save settings", 'v', EditorCmd::SaveSettings), ], ), ]; diff --git a/local/recipes/tui/tlc/source/src/editor/mod.rs b/local/recipes/tui/tlc/source/src/editor/mod.rs index 9845b61355..126c03f360 100644 --- a/local/recipes/tui/tlc/source/src/editor/mod.rs +++ b/local/recipes/tui/tlc/source/src/editor/mod.rs @@ -1296,6 +1296,12 @@ impl Editor { EditorCmd::WordComplete => { self.word_complete(); } + EditorCmd::SaveSettings => { + self.message = Some("Save via F9→Options→Save setup".to_string()); + } + EditorCmd::Refresh => { + // TLC redraws every frame; CK_Refresh is a no-op. + } EditorCmd::SpellCheck => { let misspelled = self.find_next_misspelled( self.cursor.position(),