Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
50616148
Commit
50616148
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
prompt: recompose the statusbar text whenever the window size changes
This fixes
https://savannah.gnu.org/bugs/?48796
.
parent
3e40e5d4
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/prompt.c
+7
-3
src/prompt.c
with
7 additions
and
3 deletions
+7
-3
src/prompt.c
View file @
50616148
...
...
@@ -563,10 +563,12 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
assert
(
statusbar_x
<=
strlen
(
answer
));
#ifndef NANO_TINY
/* If the window size changed, go reformat the prompt string. */
if
(
kbinput
==
KEY_WINCH
)
{
refresh_func
();
update_the_statusbar
();
continue
;
*
actual
=
KEY_WINCH
;
free
(
magichistory
);
return
NULL
;
}
#endif
func
=
func_from_key
(
&
kbinput
);
...
...
@@ -706,7 +708,7 @@ int do_prompt(bool allow_tabs,
void
(
*
refresh_func
)(
void
),
const
char
*
msg
,
...)
{
va_list
ap
;
int
retval
;
int
retval
=
KEY_WINCH
;
functionptrtype
func
;
#ifndef DISABLE_TABCOMP
bool
listed
=
FALSE
;
...
...
@@ -717,6 +719,7 @@ int do_prompt(bool allow_tabs,
bottombars
(
menu
);
while
(
retval
==
KEY_WINCH
)
{
prompt
=
charalloc
((
COLS
*
mb_cur_max
())
+
1
);
va_start
(
ap
,
msg
);
vsnprintf
(
prompt
,
COLS
*
mb_cur_max
(),
msg
,
ap
);
...
...
@@ -735,6 +738,7 @@ int do_prompt(bool allow_tabs,
free
(
prompt
);
prompt
=
NULL
;
}
/* 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
Menu
Projects
Groups
Snippets
Help