Now syntax highlighting is updating correctly when cutting a line.

This commit is contained in:
GrenderG
2017-04-11 02:11:52 +02:00
parent 42653f1a82
commit da2a1a89e1
+4
View File
@@ -912,6 +912,10 @@ void editorCopy(int cut) {
void editorCut() {
editorCopy(-1);
editorDelRow(ec.cursor_y);
if (ec.num_rows - ec.cursor_y > 0)
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);
}