Solved an issue when cutting the last line of a file.
This commit is contained in:
1 parent
dc47073875
commit
8ab6286f1a
1 file changed
+1
-1
@@ -916,7 +916,7 @@ void editorCut() {
|
||||
editorUpdateSyntax(&ec.row[ec.cursor_y]);
|
||||
if (ec.num_rows - ec.cursor_y > 1)
|
||||
editorUpdateSyntax(&ec.row[ec.cursor_y + 1]);
|
||||
ec.cursor_x = ec.row[ec.cursor_y].size - (ec.cursor_y == ec.num_rows);
|
||||
ec.cursor_x = ec.cursor_y == ec.num_rows ? 0 : ec.row[ec.cursor_y].size;
|
||||
}
|
||||
|
||||
void editorPaste() {
|
||||
|
||||
Reference in new issue
Block a user