1
1

turn the keypad on in topwin again, and clean up do_credits() a bit

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2005-08-14 19:25:16 +00:00
родитель 85ea1de1c7
Коммит 31de105eec
3 изменённых файлов: 33 добавлений и 8 удалений

Просмотреть файл

@ -118,10 +118,11 @@ CVS code -
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
@ -322,6 +323,12 @@ CVS code -
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)

Просмотреть файл

@ -648,9 +648,9 @@ void window_init(void)
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);
}

Просмотреть файл

@ -4185,6 +4185,8 @@ void dump_filestruct_reverse(void)
/* 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" */
@ -4262,9 +4264,15 @@ void do_credits(void)
#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();
@ -4296,21 +4304,31 @@ void do_credits(void)
}
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