and NANO_APPEND_KEY are. Changes to shortcut_init(), usage(),
main(), search_init(), nanorc.sample, nano.1, nanorc.5,
nano.texi, etc. (DLR)
+- chars.c:
+ make_mbstring()
+ - Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a
+ compilation problem when --enable-nanorc isn't used and
+ --enable-extra is. (DLR)
- cut.c:
cut_line()
- Set placewewant properly after cutting a line, to avoid a
total_update()
- Simplify to call clearok(TRUE) and wrefresh() on edit, which
updates the entire screen in fewer function calls. (DLR)
+ do_credits()
+ - Save the keystroke that breaks us out of the credits (if any)
+ and put it back so that it isn't lost. This is especially
+ needed if the keystroke is part of a multibyte character.
+ (DLR)
- configure.ac:
- Minor tweaks to some of the test blocks to avoid XSI:isms.
(DLR, adapted from a Debian patch for GNU ed by David
return chr_mb;
}
-#if defined(ENABLE_NANORC) || defined(ENABLE_EXTRA)
+#if defined(ENABLE_NANORC) || defined(NANO_EXTRA)
/* Convert the string str to a valid multibyte string with the same wide
* character values as str. Return the (dynamically allocated)
* multibyte string. */
/* Easter egg: Display credits. Assume nodelay(edit) is FALSE. */
void do_credits(void)
{
- int crpos = 0, xlpos = 0;
+ int kbinput = ERR, crpos = 0, xlpos = 0;
const char *credits[CREDIT_LEN] = {
NULL, /* "The nano text editor" */
NULL, /* "version" */
wrefresh(bottomwin);
for (crpos = 0; crpos < CREDIT_LEN + editwinrows / 2; crpos++) {
- if (wgetch(edit) != ERR)
+ if ((kbinput = wgetch(edit)) != ERR)
break;
if (crpos < CREDIT_LEN) {
napms(700);
scroll(edit);
wrefresh(edit);
- if (wgetch(edit) != ERR)
+ if ((kbinput = wgetch(edit)) != ERR)
break;
napms(700);
scroll(edit);
wrefresh(edit);
}
+ if (kbinput != ERR)
+ ungetch(kbinput);
+
+ curs_set(1);
scrollok(edit, FALSE);
nodelay(edit, FALSE);
- curs_set(1);
total_refresh();
}
#endif