about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/kilo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kilo.c b/src/kilo.c
index a8b55d2..edf3617 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -425,6 +425,8 @@ static void editorDelRow(int at) {
 }
 
 void editorClear(void) {
+    E.cx = E.cy = 0;
+    E.rowoff = E.coloff = 0;
     for (int j = E.numrows-1; j >= 0; j--)
       editorDelRow(j);
 }