Skip to content

Commit

Permalink
Move left when exiting insert mode
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Stan <[email protected]>
  • Loading branch information
andreistan26 committed Jan 8, 2024
1 parent aa101f4 commit 8880bf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file added src/edit_mode/vi/.mod.rs.swp
Binary file not shown.
6 changes: 5 additions & 1 deletion src/edit_mode/vi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ impl EditMode for Vi {
(_, KeyModifiers::NONE, KeyCode::Esc) => {
self.cache.clear();
self.mode = ViMode::Normal;
ReedlineEvent::Multiple(vec![ReedlineEvent::Esc, ReedlineEvent::Repaint])
ReedlineEvent::Multiple(vec![
ReedlineEvent::Left,
ReedlineEvent::Esc,
ReedlineEvent::Repaint,
])
}
(_, KeyModifiers::NONE, KeyCode::Enter) => {
self.mode = ViMode::Insert;
Expand Down

0 comments on commit 8880bf2

Please sign in to comment.