From 0abb788594072f11ea1d0a718230ce0b35d8c410 Mon Sep 17 00:00:00 2001 From: Hadeed Ahmad Date: Sat, 26 Aug 2023 23:19:09 +0500 Subject: [PATCH] Fix a bug --- kilo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kilo.c b/kilo.c index 270f0bd..fd94333 100644 --- a/kilo.c +++ b/kilo.c @@ -181,7 +181,7 @@ void editor_draw_rows() { if (in_file) { struct EROW curr_row = E.rows[y + E.row_off]; - int max_len = MAX(curr_row.size, E.screencols); + int max_len = MIN(curr_row.size, E.screencols); rb_append(E.rb, curr_row.s, max_len); } else if (no_file && y == E.screenrows / 2) {