forked from mars/breed
Insert: add o-insert with newline
This commit is contained in:
parent
9c633b4c72
commit
8a110c5b01
|
@ -287,6 +287,14 @@ 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;
|
||||
let index = self.buffer.cursor_to_char(self.cursor);
|
||||
self.buffer.text.insert(index, "\n");
|
||||
self.mode = Mode::Insert(state);
|
||||
}
|
||||
KeyCode::Char(':') => {
|
||||
self.mode = Mode::Command(Default::default());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue