Now syntax highlighting is updating correctly when cutting a line.
This commit is contained in:
1 parent
42653f1a82
commit
da2a1a89e1
1 file changed
+4
@@ -912,6 +912,10 @@ void editorCopy(int cut) {
|
|||||||
void editorCut() {
|
void editorCut() {
|
||||||
editorCopy(-1);
|
editorCopy(-1);
|
||||||
editorDelRow(ec.cursor_y);
|
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);
|
ec.cursor_x = ec.row[ec.cursor_y].size - (ec.cursor_y == ec.num_rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user