o-insert #5

Merged
mars merged 5 commits from roux/breed:o-insert into main 2023-04-12 04:21:46 +00:00
1 changed files with 13 additions and 0 deletions

View File

@ -194,6 +194,19 @@ impl State {
self.move_cursor(Direction::Right);
self.mode = Mode::Insert(state);
}
KeyCode::Char('o') => {
let state = InsertState { append: false };
self.cursor.line += 1;
self.cursor.column = 0;
self.buffer.insert_char(self.cursor, '\n');
self.mode = Mode::Insert(state);
}
KeyCode::Char('O') => {
let state = InsertState { append: false };
self.cursor.column = 0;
self.buffer.insert_char(self.cursor, '\n');
self.mode = Mode::Insert(state);
}
KeyCode::Char(':') => {
self.mode = Mode::Command(Default::default());
}