Solved an issue when cutting the last line of a file.

This commit is contained in:
GrenderG
2017-04-11 02:55:24 +02:00
parent dc47073875
commit 8ab6286f1a
+1 -1
View File
@@ -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() {