Skip to content

Commit

Permalink
fix: enter insert mode after open new line
Browse files Browse the repository at this point in the history
  • Loading branch information
metiftikci committed Oct 27, 2023
1 parent 4c9749e commit ffa648e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/buffer/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ impl Buffer {
let row = self.cursor.y;
self.insert_line(row);
self.move_cursor(row, 0);
self.enter_insert_mode();
}

pub fn open_new_line_next(&mut self) {
let row = self.cursor.y + 1;
self.insert_line(row);
self.move_cursor(row, 0);
self.enter_insert_mode();
}

pub fn split_line(&mut self, row: usize, column: usize) -> Result<(), String> {
Expand Down

0 comments on commit ffa648e

Please sign in to comment.