toggle mirrored

This commit is contained in:
Greg Shuflin committed 2024-03-08 09:26:38 -08:00
1 parent 90301aa069
commit d44a3552c9
3 files changed
+7

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ impl Configuration {
Mode::Insert | Mode::Command => InsertCharacter(ch),
Mode::Normal if ch == 'i' => TransitionToMode(Mode::Insert),
Mode::Normal if ch == 'q' => Quit,
Mode::Normal if ch == 'm' => Mirror,
Mode::Normal if ch == 'h' => MoveCursor(CursorMovement::OppositeTextDirection),
Mode::Normal if ch == 'j' => MoveCursor(CursorMovement::NextLine),
Mode::Normal if ch == 'k' => MoveCursor(CursorMovement::PrevLine),
+3
View File
@@ -160,6 +160,9 @@ impl EditorCore {
let mode = self.mode;
match action {
Mirror => {
self.mirrored = !self.mirrored;
}
Command(command) => match command {
CommandAction::Execute => self.commands.execute(),
CommandAction::Tab => self.commands.tab(),
+3
View File
@@ -25,6 +25,9 @@ pub(crate) enum EditorAction {
/// Quit the editor
Quit,
/// Toggle mirror
Mirror,
}
#[derive(Debug)]