in get_prompt_string(), initialize finished to FALSE so that the

do/while loop works properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2006-02-09 22:35:04 +00:00
parent 3326603341
commit 162ed2af24
2 changed files with 4 additions and 3 deletions

View File

@ -41,8 +41,9 @@ CVS code -
file browser shortcut list. (DLR) file browser shortcut list. (DLR)
- prompt.c: - prompt.c:
get_prompt_string() get_prompt_string()
- Use a do/while loop instead of a while loop, for consistency. - Use a do/while loop instead of a while loop, for consistency,
(DLR) and initialize finished to FALSE to make sure it works
properly. (DLR)
- Redraw the prompt and set finished to FALSE when NANO_HELP_KEY - Redraw the prompt and set finished to FALSE when NANO_HELP_KEY
is pressed, so that we don't leave the prompt, enter the help is pressed, so that we don't leave the prompt, enter the help
browser, and restart the prompt after leaving it. This will browser, and restart the prompt after leaving it. This will

View File

@ -912,7 +912,7 @@ int get_prompt_string(bool allow_tabs,
) )
{ {
int kbinput = ERR; int kbinput = ERR;
bool meta_key, func_key, s_or_t, ran_func, finished; bool meta_key, func_key, s_or_t, ran_func, finished = FALSE;
size_t curranswer_len; size_t curranswer_len;
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
bool tabbed = FALSE; bool tabbed = FALSE;