From da2a1a89e1fa3bd62bb6ae848ad7fd3b26d70bf7 Mon Sep 17 00:00:00 2001 From: GrenderG Date: Tue, 11 Apr 2017 02:11:52 +0200 Subject: [PATCH] Now syntax highlighting is updating correctly when cutting a line. --- tte.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tte.c b/tte.c index 16e2c52..65cbe86 100644 --- a/tte.c +++ b/tte.c @@ -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); }