From c9de6ae5d6b852d802eec2db44caac3b15b62e83 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 28 Nov 2021 21:48:35 -0800 Subject: redo uncomment It was printing a phantom null at end of line on screen. --- src/kilo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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() { -- cgit 1.4.1-2-gfad0