Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
4f156aa6
Commit
4f156aa6
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
prompt: set up the prepared answer before allowing to change it
This fixes
https://savannah.gnu.org/bugs/?48916
.
parent
6142ef87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/prompt.c
+2
-4
src/prompt.c
with
2 additions
and
4 deletions
+2
-4
src/prompt.c
View file @
4f156aa6
...
...
@@ -512,7 +512,6 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
#ifndef DISABLE_TABCOMP
bool
allow_files
,
bool
*
listed
,
#endif
const
char
*
curranswer
,
#ifndef DISABLE_HISTORIES
filestruct
**
history_list
,
#endif
...
...
@@ -540,8 +539,6 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
#endif
#endif
/* !DISABLE_HISTORIES */
answer
=
mallocstrcpy
(
answer
,
curranswer
);
if
(
statusbar_x
>
strlen
(
answer
))
{
statusbar_x
=
strlen
(
answer
);
statusbar_pww
=
statusbar_xplustabs
();
...
...
@@ -721,6 +718,8 @@ int do_prompt(bool allow_tabs,
bottombars
(
menu
);
answer
=
mallocstrcpy
(
answer
,
curranswer
);
while
(
retval
==
KEY_WINCH
)
{
prompt
=
charalloc
((
COLS
*
mb_cur_max
())
+
1
);
va_start
(
ap
,
msg
);
...
...
@@ -733,7 +732,6 @@ int do_prompt(bool allow_tabs,
#ifndef DISABLE_TABCOMP
allow_files
,
&
listed
,
#endif
curranswer
,
#ifndef DISABLE_HISTORIES
history_list
,
#endif
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment