o-insert #5
13
src/main.rs
13
src/main.rs
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue