about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-28 21:48:35 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-28 21:48:38 -0800
commitc9de6ae5d6b852d802eec2db44caac3b15b62e83 (patch)
tree88c92cba32ca8273e2d0258d8d0ea2f90f7fa382
parent418fce4464764e8c8e1cc8f5d5bfbcc9c88185e1 (diff)
downloadteliva-c9de6ae5d6b852d802eec2db44caac3b15b62e83.tar.gz
redo uncomment
It was printing a phantom null at end of line on screen.
-rw-r--r--src/kilo.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/kilo.c b/src/kilo.c
index 5b9fd76..8bc1213 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -574,12 +574,13 @@ static void editorDelChar() {
 
 static void editorUncommentCursorRow() {
     erow *row = &E.row[E.rowoff+E.cy];
-    editorRowDelChar(row, 0);
-    editorRowDelChar(row, 0);
-    editorRowDelChar(row, 0);
-    editorRowDelChar(row, 0);
     E.coloff = 0;
-    E.cx = 0;
+    E.cx = 4;
+    editorUpdateRow(row);
+    editorDelChar();
+    editorDelChar();
+    editorDelChar();
+    editorDelChar();
 }
 
 static void editorCommentCursorRow() {