1
1

Letting bottombars() set the global variable 'currmenu'.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Benno Schulenberg 2015-04-07 14:16:07 +00:00
родитель d5177059e8
Коммит d8b6dbfffe
7 изменённых файлов: 8 добавлений и 18 удалений

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

@ -11,6 +11,9 @@
'focusing' when searching only for filenames. 'focusing' when searching only for filenames.
* src/browser.c (findnextfile, do_filesearch, do_fileresearch): * src/browser.c (findnextfile, do_filesearch, do_fileresearch):
Greatly simplify the searching for the next matching filename. Greatly simplify the searching for the next matching filename.
* src/{browser,files,help,prompt,text,winio}.c: Let the function
bottombars() set the global variable 'currmenu' -- the displayed
menu must necessarily be the active one.
2015-04-05 Benno Schulenberg <bensberg@justemail.net> 2015-04-05 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Expand on nano's features, condense the * doc/texinfo/nano.texi: Expand on nano's features, condense the

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

@ -60,7 +60,6 @@ char *do_browser(char *path, DIR *dir)
curs_set(0); curs_set(0);
blank_statusbar(); blank_statusbar();
currmenu = MBROWSER;
bottombars(MBROWSER); bottombars(MBROWSER);
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
@ -197,7 +196,6 @@ char *do_browser(char *path, DIR *dir)
browser_refresh, _("Go To Directory")); browser_refresh, _("Go To Directory"));
curs_set(0); curs_set(0);
currmenu = MBROWSER;
bottombars(MBROWSER); bottombars(MBROWSER);
/* If the directory begins with a newline (i.e. an /* If the directory begins with a newline (i.e. an
@ -823,7 +821,6 @@ void findnextfile(const char *needle)
* shortcut list to the browser shortcut list, and displaying it. */ * shortcut list to the browser shortcut list, and displaying it. */
void filesearch_abort(void) void filesearch_abort(void)
{ {
currmenu = MBROWSER;
bottombars(MBROWSER); bottombars(MBROWSER);
} }

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

@ -1049,8 +1049,6 @@ void do_insertfile(
bool right_side_up = FALSE, single_line = FALSE; bool right_side_up = FALSE, single_line = FALSE;
#endif #endif
currmenu = MINSERTFILE;
while (TRUE) { while (TRUE) {
#ifndef NANO_TINY #ifndef NANO_TINY
if (execute) { if (execute) {
@ -2252,8 +2250,6 @@ bool do_writeout(bool exiting)
#endif #endif
bool retval = FALSE; bool retval = FALSE;
currmenu = MWRITEFILE;
if (exiting && openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) { if (exiting && openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) {
retval = write_file(openfile->filename, NULL, FALSE, OVERWRITE, retval = write_file(openfile->filename, NULL, FALSE, OVERWRITE,
FALSE); FALSE);

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

@ -62,10 +62,6 @@ void do_help(void (*refresh_func)(void))
assert(help_text != NULL); assert(help_text != NULL);
/* Set currmenu to allow clicking on the help screen's shortcut
* list, after help_init() is called. */
currmenu = MHELP;
if (ISSET(NO_HELP)) { if (ISSET(NO_HELP)) {
/* Make sure that the help screen's shortcut list will actually /* Make sure that the help screen's shortcut list will actually
* be displayed. */ * be displayed. */
@ -158,15 +154,14 @@ void do_help(void (*refresh_func)(void))
} }
} }
currmenu = oldmenu;
if (old_no_help) { if (old_no_help) {
blank_bottombars(); blank_bottombars();
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
currmenu = oldmenu;
SET(NO_HELP); SET(NO_HELP);
window_init(); window_init();
} else } else
bottombars(currmenu); bottombars(oldmenu);
curs_set(1); curs_set(1);
refresh_func(); refresh_func();

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

@ -969,7 +969,6 @@ int do_prompt(bool allow_tabs,
prompt = charalloc(((COLS - 4) * mb_cur_max()) + 1); prompt = charalloc(((COLS - 4) * mb_cur_max()) + 1);
currmenu = menu;
bottombars(menu); bottombars(menu);
va_start(ap, msg); va_start(ap, msg);

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

@ -2213,7 +2213,6 @@ void do_justify(bool full_justify)
/* Display the shortcut list with UnJustify. */ /* Display the shortcut list with UnJustify. */
uncutfunc->desc = unjust_tag; uncutfunc->desc = unjust_tag;
currmenu = MMAIN;
display_main_list(); display_main_list();
/* Now get a keystroke and see if it's unjustify. If not, put back /* Now get a keystroke and see if it's unjustify. If not, put back
@ -2914,7 +2913,6 @@ void do_spell(void)
/* Cleanup things to do after leaving the linter. */ /* Cleanup things to do after leaving the linter. */
void lint_cleanup(void) void lint_cleanup(void)
{ {
currmenu = MMAIN;
display_main_list(); display_main_list();
} }
@ -3129,7 +3127,6 @@ void do_linter(void)
return; return;
} }
currmenu = MLINTER;
bottombars(MLINTER); bottombars(MLINTER);
tmplint = NULL; tmplint = NULL;
curlint = lints; curlint = lints;

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

@ -2344,6 +2344,9 @@ void bottombars(int menu)
subnfunc *f; subnfunc *f;
const sc *s; const sc *s;
/* Set the global variable to the given menu. */
currmenu = menu;
if (ISSET(NO_HELP)) if (ISSET(NO_HELP))
return; return;