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
c11c6884
Commit
c11c6884
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: fix compilation with --enable-tiny again
parent
514cd9a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/prompt.c
+19
-13
src/prompt.c
with
19 additions
and
13 deletions
+19
-13
src/prompt.c
View file @
c11c6884
...
...
@@ -652,7 +652,7 @@ int do_prompt(bool allow_tabs,
void
(
*
refresh_func
)(
void
),
const
char
*
msg
,
...)
{
va_list
ap
;
int
retval
=
KEY_WINCH
;
int
retval
;
functionptrtype
func
=
NULL
;
#ifndef DISABLE_TABCOMP
bool
listed
=
FALSE
;
...
...
@@ -664,15 +664,17 @@ int do_prompt(bool allow_tabs,
answer
=
mallocstrcpy
(
answer
,
curranswer
);
while
(
retval
==
KEY_WINCH
)
{
prompt
=
charalloc
((
COLS
*
mb_cur_max
())
+
1
);
va_start
(
ap
,
msg
);
vsnprintf
(
prompt
,
COLS
*
mb_cur_max
(),
msg
,
ap
);
va_end
(
ap
);
/* Reserve five columns for colon plus angles plus answer, ":<aa>". */
null_at
(
&
prompt
,
actual_x
(
prompt
,
(
COLS
<
5
)
?
0
:
COLS
-
5
));
func
=
acquire_an_answer
(
&
retval
,
allow_tabs
,
#ifndef NANO_TINY
redo_theprompt:
#endif
prompt
=
charalloc
((
COLS
*
mb_cur_max
())
+
1
);
va_start
(
ap
,
msg
);
vsnprintf
(
prompt
,
COLS
*
mb_cur_max
(),
msg
,
ap
);
va_end
(
ap
);
/* Reserve five columns for colon plus angles plus answer, ":<aa>". */
null_at
(
&
prompt
,
actual_x
(
prompt
,
(
COLS
<
5
)
?
0
:
COLS
-
5
));
func
=
acquire_an_answer
(
&
retval
,
allow_tabs
,
#ifndef DISABLE_TABCOMP
allow_files
,
&
listed
,
#endif
...
...
@@ -681,9 +683,13 @@ int do_prompt(bool allow_tabs,
#endif
refresh_func
);
free
(
prompt
);
prompt
=
NULL
;
}
free
(
prompt
);
prompt
=
NULL
;
#ifndef NANO_TINY
if
(
retval
==
KEY_WINCH
)
goto
redo_theprompt
;
#endif
/* If we're done with this prompt, restore the x position to what
* it was at a possible previous prompt. */
...
...
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