favor of the last stored search (47) [FIXED]
- If nano fails to open a file when it starts up,doing almost anything
causes a segfault (discovered by Ben Roberts) (48). [FIXED]
+- In certain terminals, nano would not work properly with keypad().
+ Turned out to be the silly timeout(0) call which is completely
+ unneeded anyway. (49) [FIXED]
** Open BUGS **
filestat(). New shortcut list browser_list. Some new
strings to translate. Chris needs to add comments to his
code.
+ - We only call keypad() once now for each window, at the beginning.
+ FINALLY! No more keypad_on(), no more individual calls in
+ main(), do_help(), do_browser(), etc etc etc. Removed call to
+ timeout(0) in main() (which caused the whole mess), fixes BUG #49.
- faq.html:
- Fix typos and small mistakes (Jordi).
- files.c:
titlebar(path);
bottombars(browser_list, BROWSER_LIST_LEN);
- keypad_on(TRUE);
curs_set(0);
wmove(edit, 0, 0);
i = 0;
char *last_replace = NULL; /* Last replacement string */
int search_last_line; /* Is this the last search line? */
-void keypad_on(int yesno)
-{
- keypad(edit, yesno);
- keypad(bottomwin, yesno);
-}
-
/* What we do when we're all set to exit */
RETSIGTYPE finish(int sigage)
{
} else
mvwaddstr(bottomwin, 0, 0, hblank);
- /* Apparently you REALLY can't get away with not calling keypad()
- or your window looks awful when it exits. so we just call it right
- before we exit, muhaha :-) */
- keypad_on(TRUE);
wrefresh(bottomwin);
endwin();
/* And the other windows */
topwin = newwin(2, COLS, 0, 0);
bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0);
+
+ /* HAHA! Only do this once! */
+ keypad(edit, TRUE);
+ keypad(bottomwin, TRUE);
}
void mouse_init(void)
#ifndef NANO_SMALL
#ifdef NCURSES_MOUSE_VERSION
if (ISSET(USE_MOUSE)) {
- keypad_on(TRUE);
-
mousemask(BUTTON1_RELEASED, NULL);
mouseinterval(50);
- } else {
+ } else
mousemask(0, NULL);
- keypad_on(FALSE);
- }
+
#endif
#endif
nonl();
cbreak();
noecho();
- timeout(0);
/* Set up some global variables */
global_init();
window_init();
mouse_init();
-#ifdef PDCURSES
- /* Must have this for the arrow, et al, keys to even work in
- PDCurses+cygwin under Windows */
- keypad_on(TRUE);
-#endif
-
#ifdef DEBUG
fprintf(stderr, _("Main: bottom win\n"));
#endif
void replace_abort(void);
void add_to_cutbuffer(filestruct * inptr);
void do_replace_highlight(int highlight_flag, char *word);
-void keypad_on(int yesno);
void nano_disabled_msg(void);
#ifdef NANO_EXTRA
void do_credits(void);
int i, j, row = 0, page = 1, kbinput = 0, no_more = 0;
int no_help_flag = 0;
-
- /* Oh well, they've asked for the help menu, if the keypad is not on now
- we're going to have to turn it on */
- keypad_on(TRUE);
-
blank_edit();
curs_set(0);
blank_statusbar();