toggle mirrored
This commit is contained in:
1 parent
90301aa069
commit
d44a3552c9
3 files changed
+7
No files matched your search
@@ -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),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -25,6 +25,9 @@ pub(crate) enum EditorAction {
|
||||
|
||||
/// Quit the editor
|
||||
Quit,
|
||||
|
||||
/// Toggle mirror
|
||||
Mirror,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in new issue
Block a user