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
1e3cffbb
Commit
1e3cffbb
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
prompt: show a trailing $ when the tail of the answer is offscreen
This fixes
https://savannah.gnu.org/bugs/?48894
.
parent
92c97c70
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
+4
-1
src/prompt.c
with
4 additions
and
1 deletion
+4
-1
src/prompt.c
View file @
1e3cffbb
...
...
@@ -466,7 +466,7 @@ void reset_statusbar_cursor(void)
/* Repaint the statusbar. */
void
update_the_statusbar
(
void
)
{
size_t
start_col
,
index
,
page_start
;
size_t
start_col
,
index
,
page_start
,
page_end
;
char
*
expanded
;
assert
(
prompt
!=
NULL
&&
statusbar_x
<=
strlen
(
answer
));
...
...
@@ -474,6 +474,7 @@ void update_the_statusbar(void)
start_col
=
strlenpt
(
prompt
)
+
2
;
index
=
strnlenpt
(
answer
,
statusbar_x
);
page_start
=
get_statusbar_page_start
(
start_col
,
start_col
+
index
);
page_end
=
get_statusbar_page_start
(
start_col
,
start_col
+
strlenpt
(
answer
)
-
1
);
wattron
(
bottomwin
,
interface_color_pair
[
TITLE_BAR
]);
...
...
@@ -487,6 +488,8 @@ void update_the_statusbar(void)
waddstr
(
bottomwin
,
expanded
);
free
(
expanded
);
waddch
(
bottomwin
,
(
page_start
>=
page_end
)
?
' '
:
'$'
);
wattroff
(
bottomwin
,
interface_color_pair
[
TITLE_BAR
]);
statusbar_pww
=
statusbar_xplustabs
();
...
...
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