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
This commit is contained in:
4
editor.c
4
editor.c
@@ -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++;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user