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 ***/