Fix a bug
This commit is contained in:
parent
9f365822af
commit
0abb788594
1 changed files with 1 additions and 1 deletions
2
kilo.c
2
kilo.c
|
@ -181,7 +181,7 @@ void editor_draw_rows() {
|
||||||
|
|
||||||
if (in_file) {
|
if (in_file) {
|
||||||
struct EROW curr_row = E.rows[y + E.row_off];
|
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);
|
rb_append(E.rb, curr_row.s, max_len);
|
||||||
} else if (no_file && y == E.screenrows / 2) {
|
} else if (no_file && y == E.screenrows / 2) {
|
||||||
|
|
Reference in a new issue