prompt: set up the prepared answer before allowing to change it
This fixes https://savannah.gnu.org/bugs/?48916.master
parent
6142ef87b5
commit
4f156aa6db
|
@ -512,7 +512,6 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
|
||||||
#ifndef DISABLE_TABCOMP
|
#ifndef DISABLE_TABCOMP
|
||||||
bool allow_files, bool *listed,
|
bool allow_files, bool *listed,
|
||||||
#endif
|
#endif
|
||||||
const char *curranswer,
|
|
||||||
#ifndef DISABLE_HISTORIES
|
#ifndef DISABLE_HISTORIES
|
||||||
filestruct **history_list,
|
filestruct **history_list,
|
||||||
#endif
|
#endif
|
||||||
|
@ -540,8 +539,6 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
|
||||||
#endif
|
#endif
|
||||||
#endif /* !DISABLE_HISTORIES */
|
#endif /* !DISABLE_HISTORIES */
|
||||||
|
|
||||||
answer = mallocstrcpy(answer, curranswer);
|
|
||||||
|
|
||||||
if (statusbar_x > strlen(answer)) {
|
if (statusbar_x > strlen(answer)) {
|
||||||
statusbar_x = strlen(answer);
|
statusbar_x = strlen(answer);
|
||||||
statusbar_pww = statusbar_xplustabs();
|
statusbar_pww = statusbar_xplustabs();
|
||||||
|
@ -721,6 +718,8 @@ int do_prompt(bool allow_tabs,
|
||||||
|
|
||||||
bottombars(menu);
|
bottombars(menu);
|
||||||
|
|
||||||
|
answer = mallocstrcpy(answer, curranswer);
|
||||||
|
|
||||||
while (retval == KEY_WINCH) {
|
while (retval == KEY_WINCH) {
|
||||||
prompt = charalloc((COLS * mb_cur_max()) + 1);
|
prompt = charalloc((COLS * mb_cur_max()) + 1);
|
||||||
va_start(ap, msg);
|
va_start(ap, msg);
|
||||||
|
@ -733,7 +732,6 @@ int do_prompt(bool allow_tabs,
|
||||||
#ifndef DISABLE_TABCOMP
|
#ifndef DISABLE_TABCOMP
|
||||||
allow_files, &listed,
|
allow_files, &listed,
|
||||||
#endif
|
#endif
|
||||||
curranswer,
|
|
||||||
#ifndef DISABLE_HISTORIES
|
#ifndef DISABLE_HISTORIES
|
||||||
history_list,
|
history_list,
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue