Fixed a bug where, if a page ends in a line that just contains the newline character, the page doesn't render correctly after scrolling

master
Aadhavan Srinivasan 2 years ago
parent d4a7dbb88f
commit 1355c58cf3

@ -246,8 +246,6 @@ int main(int argc, char** argv) {
if (i >= buffer->size) {
break;
}
waddch(mainwin,*(buffer->text + i));
i++;
fprintf(logfile,"At line %d of %d\n",getcury(mainwin),getmaxy(mainwin));
if (*(buffer->text + i) == '\n' && ((getcury(mainwin) + 1) == getmaxy(mainwin))) {
@ -255,6 +253,8 @@ int main(int argc, char** argv) {
break;
}
waddch(mainwin,*(buffer->text + i));
i++;
}

Loading…
Cancel
Save