Repository: ilai-deutel/kibi (language: rust)

Issue:
Syntax highlighting: Row not updated after pressing backspace
Steps to replicate:

```bash
echo '/**\n/\nTest*/' > /tmp/kibi-row-syntax-bug.rs
kibi /tmp/kibi-row-syntax-bug.rs
```

Output (as expected):
![image](https://user-images.githubusercontent.com/10098207/75122601-47333000-5654-11ea-81e6-744670e564f3.png)

Move down, press backspace.

Output:
![image](https://user-images.githubusercontent.com/10098207/75122606-574b0f80-5654-11ea-843e-0396bba987e1.png)

Expected:
![image](https://user-images.githubusercontent.com/10098207/75122607-603be100-5654-11ea-9a88-1c8a21f918f8.png)



Discussion / hints:

Fix patch:
diff --git a/src/editor.rs b/src/editor.rs
index 3c839d88..f99c2015 100644
--- a/src/editor.rs
+++ b/src/editor.rs
@@ -364,7 +364,7 @@ impl<'a> Editor<'a> {
         } else {
             // self.rows[self.cursor.y] must exist, since cursor.x = 0 for any cursor.y ≥ row.len()
             let new_chars = self.rows[self.cursor.y].chars.split_off(self.cursor.x);
-            self.update_row(self.cursor.y, true);
+            self.update_row(self.cursor.y, false);
             (self.cursor.y + 1, new_chars)
         };
         self.rows.insert(position, Row::new(new_row_chars));
@@ -394,6 +394,7 @@ impl<'a> Editor<'a> {
             self.cursor.x = previous_row.chars.len();
             previous_row.chars.extend(&row.chars);
             self.update_row(self.cursor.y - 1, true);
+            self.update_row(self.cursor.y, false);
             // The number of rows has changed. The left padding may need to be updated.
             self.update_screen_cols();
             self.dirty = true;


Test patch: