From 07882d8ba5c29614131e5954b2e715d45999acf7 Mon Sep 17 00:00:00 2001 From: jmug Date: Fri, 9 Oct 2026 18:03:51 -0700 Subject: [PATCH] feat: Row drawing boilerplate. --- kilo.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kilo.c b/kilo.c index 7333c64..bb2dd3f 100644 --- a/kilo.c +++ b/kilo.c @@ -65,11 +65,21 @@ char editorReadKey() { /*** output ***/ +void editorDrawRows() { + for (int y = 0; y < 24; y++) { + write(STDOUT_FILENO, "~\r\n", 3); + } +} + void editorRefreshScreen() { // Clear the whole screen. write(STDOUT_FILENO, "\x1b[2J", 4); // Move cursor to top left. write(STDOUT_FILENO, "\x1b[H", 3); + + editorDrawRows(); + + write(STDOUT_FILENO, "\x1b[H", 3); } /*** input ***/