tweaks: express an 'if' more concisely, and add two blank lines

The calls of wnoutrefresh() after those new blank lines are not needed
for ncurses to show the cursor in the right place, but are logically
needed because things have been written to the screen in the preceding
code -- although nano seems to work correctly also without those calls.
This commit is contained in:
Benno Schulenberg 2024-03-17 16:57:19 +01:00
parent a7635ceb5d
commit 170e7d79e7
2 changed files with 3 additions and 4 deletions

View File

@ -392,6 +392,7 @@ void draw_the_promptbar(void)
/* Place the cursor at the right spot. */
wmove(footwin, 0, column - the_page);
wnoutrefresh(footwin);
}

View File

@ -3420,10 +3420,7 @@ void edit_refresh(void)
line = openfile->edittop;
while (row < editwinrows && line != NULL) {
if (line == openfile->current)
row += update_line(line, openfile->current_x);
else
row += update_line(line, 0);
row += update_line(line, (line == openfile->current) ? openfile->current_x : 0);
line = line->next;
}
@ -3441,6 +3438,7 @@ void edit_refresh(void)
#endif
place_the_cursor();
wnoutrefresh(midwin);
refresh_needed = FALSE;