new_magicline(), remove_magicline(), and do_cursorpos(). (DLR)
- Various fill-related cleanups. Move check_die_too_small() and
window_size_init()'s code into window_init(), as they really
- belong there, remove associated separate calls to them, and
- make sure window_init() is always called at the same time when
- redrawing the screen. Changes to window_init(), main(), and
- do_alt_speller(); removal of check_die_too_small() and
+ belong there, remove associated separate calls to them, make
+ sure window_init() is always called at the same time when
+ redrawing the screen, and turn the keypad on in topwin in case
+ we ever read input from it. Changes to window_init(), main(),
+ and do_alt_speller(); removal of check_die_too_small() and
window_size_init(). (DLR)
- Remove still more redundant screen updates. Change all
wrefresh() calls to wnoutrefresh() calls, except for those in
that there's more room for other things, and to not display
the status when we're in the file browser, since Pico doesn't.
(DLR)
+ do_credits()
+ - Various cleanups. Turn on the MORE_SPACE and NO_HELP flags
+ before showing the credits, so that they use as much of the
+ screen as possible, and set the flags back to their original
+ values afterward. Also, only call scrollok() just before and
+ after we scroll. (DLR)
- configure.ac:
- Since we only use vsnprintf() now, remove the tests for
snprintf(). (DLR)
bottomwin = newwin(3 - no_help(), COLS, editwinrows + (2 -
no_more_space()), 0);
- /* Turn the keypad on for the windows that get input, if
- * necessary. */
+ /* Turn the keypad on for the windows, if necessary. */
if (!ISSET(REBIND_KEYPAD)) {
+ keypad(topwin, TRUE);
keypad(edit, TRUE);
keypad(bottomwin, TRUE);
}
/* Easter egg: Display credits. Assume nodelay(edit) is FALSE. */
void do_credits(void)
{
+ bool old_more_space = ISSET(MORE_SPACE);
+ bool old_no_help = ISSET(NO_HELP);
int kbinput = ERR, crpos = 0, xlpos = 0;
const char *credits[CREDIT_LEN] = {
NULL, /* "The nano text editor" */
#endif
"Florian K\xF6nig";
+ if (!old_more_space || !old_no_help) {
+ SET(MORE_SPACE);
+ SET(NO_HELP);
+ window_init();
+ }
+
curs_set(0);
nodelay(edit, TRUE);
- scrollok(edit, TRUE);
+
blank_titlebar();
blank_topbar();
blank_edit();
}
napms(700);
+ scrollok(edit, TRUE);
scroll(edit);
+ scrollok(edit, FALSE);
wrefresh(edit);
if ((kbinput = wgetch(edit)) != ERR)
break;
napms(700);
+ scrollok(edit, TRUE);
scroll(edit);
+ scrollok(edit, FALSE);
wrefresh(edit);
}
if (kbinput != ERR)
ungetch(kbinput);
+ if (!old_more_space || !old_no_help) {
+ UNSET(MORE_SPACE);
+ UNSET(NO_HELP);
+ window_init();
+ }
+
curs_set(1);
- scrollok(edit, FALSE);
nodelay(edit, FALSE);
+
total_refresh();
}
#endif