mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-21 20:31:20 +03:00
Renaming a variable to better indicate booleanness.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5779 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
29cac04afc
commit
532d73ccc7
@ -5,6 +5,8 @@
|
||||
* src/winio.c (do_replace_highlight): Rename this to 'spotlight',
|
||||
for clarity, and for contrast with 'do_replace/do_replace_loop'.
|
||||
* src/winio.c (spotlight): Rename a variable for clarity.
|
||||
* src/files.c (input_tab), src/prompt.c (get_prompt_string):
|
||||
Rename a variable to better indicate booleanness.
|
||||
|
||||
2016-03-29 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/nano.c (main), src/text.c (do_justify, do_verbatim_input),
|
||||
|
10
src/files.c
10
src/files.c
@ -2793,15 +2793,15 @@ char **cwd_tab_completion(const char *buf, bool allow_files, size_t
|
||||
* position should be advanced. refresh_func is the function we will
|
||||
* call to refresh the edit window. */
|
||||
char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||
*lastwastab, void (*refresh_func)(void), bool *list)
|
||||
*lastwastab, void (*refresh_func)(void), bool *listed)
|
||||
{
|
||||
size_t num_matches = 0, buf_len;
|
||||
char **matches = NULL;
|
||||
|
||||
assert(buf != NULL && place != NULL && *place <= strlen(buf) &&
|
||||
lastwastab != NULL && refresh_func != NULL && list != NULL);
|
||||
lastwastab != NULL && refresh_func != NULL && listed != NULL);
|
||||
|
||||
*list = FALSE;
|
||||
*listed = FALSE;
|
||||
|
||||
/* If the word starts with `~' and there is no slash in the word,
|
||||
* then try completing this word as a username. */
|
||||
@ -2939,7 +2939,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||
}
|
||||
|
||||
wnoutrefresh(edit);
|
||||
*list = TRUE;
|
||||
*listed = TRUE;
|
||||
}
|
||||
|
||||
free(mzero);
|
||||
@ -2949,7 +2949,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||
|
||||
/* Only refresh the edit window if we don't have a list of filename
|
||||
* matches on it. */
|
||||
if (!*list)
|
||||
if (!*listed)
|
||||
refresh_func();
|
||||
|
||||
return buf;
|
||||
|
12
src/prompt.c
12
src/prompt.c
@ -527,8 +527,7 @@ void update_bar_if_needed(void)
|
||||
/* Get a string of input at the statusbar prompt. */
|
||||
functionptrtype get_prompt_string(int *actual, bool allow_tabs,
|
||||
#ifndef DISABLE_TABCOMP
|
||||
bool allow_files,
|
||||
bool *list,
|
||||
bool allow_files, bool *listed,
|
||||
#endif
|
||||
const char *curranswer,
|
||||
#ifndef DISABLE_HISTORIES
|
||||
@ -618,7 +617,7 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
|
||||
#endif
|
||||
if (allow_tabs)
|
||||
answer = input_tab(answer, allow_files, &statusbar_x,
|
||||
&tabbed, refresh_func, list);
|
||||
&tabbed, refresh_func, listed);
|
||||
|
||||
update_the_statusbar();
|
||||
} else
|
||||
@ -742,7 +741,7 @@ int do_prompt(bool allow_tabs,
|
||||
int retval;
|
||||
functionptrtype func;
|
||||
#ifndef DISABLE_TABCOMP
|
||||
bool list = FALSE;
|
||||
bool listed = FALSE;
|
||||
#endif
|
||||
|
||||
prompt = charalloc(((COLS - 4) * mb_cur_max()) + 1);
|
||||
@ -756,8 +755,7 @@ int do_prompt(bool allow_tabs,
|
||||
|
||||
func = get_prompt_string(&retval, allow_tabs,
|
||||
#ifndef DISABLE_TABCOMP
|
||||
allow_files,
|
||||
&list,
|
||||
allow_files, &listed,
|
||||
#endif
|
||||
curranswer,
|
||||
#ifndef DISABLE_HISTORIES
|
||||
@ -791,7 +789,7 @@ int do_prompt(bool allow_tabs,
|
||||
/* If we've done tab completion, there might be a list of filename
|
||||
* matches on the edit window at this point. Make sure that they're
|
||||
* cleared off. */
|
||||
if (list)
|
||||
if (listed)
|
||||
refresh_func();
|
||||
#endif
|
||||
|
||||
|
@ -341,7 +341,7 @@ char **username_tab_completion(const char *buf, size_t *num_matches,
|
||||
char **cwd_tab_completion(const char *buf, bool allow_files, size_t
|
||||
*num_matches, size_t buf_len);
|
||||
char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||
*lastwastab, void (*refresh_func)(void), bool *list);
|
||||
*lastwastab, void (*refresh_func)(void), bool *listed);
|
||||
#endif
|
||||
const char *tail(const char *foo);
|
||||
#ifndef DISABLE_HISTORIES
|
||||
@ -532,8 +532,7 @@ void update_the_statusbar(void);
|
||||
void update_bar_if_needed(void);
|
||||
functionptrtype get_prompt_string(int *value, bool allow_tabs,
|
||||
#ifndef DISABLE_TABCOMP
|
||||
bool allow_files,
|
||||
bool *list,
|
||||
bool allow_files, bool *listed,
|
||||
#endif
|
||||
const char *curranswer,
|
||||
#ifndef DISABLE_HISTORIES
|
||||
|
Loading…
Reference in New Issue
Block a user