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
92c97c70
Commit
92c97c70
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
prompt: leave always at least the last character of the answer visible
This fixes
https://savannah.gnu.org/bugs/?48912
.
parent
b77b1391
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
+6
-4
src/prompt.c
with
6 additions
and
4 deletions
+6
-4
src/prompt.c
View file @
92c97c70
...
...
@@ -431,11 +431,12 @@ size_t statusbar_xplustabs(void)
* get_statusbar_page_start(column) < COLS). */
size_t
get_statusbar_page_start
(
size_t
start_col
,
size_t
column
)
{
if
(
column
==
start_col
||
column
<
COLS
-
1
||
COLS
==
start_col
+
1
)
if
(
column
==
start_col
||
column
<
COLS
-
1
)
return
0
;
else
if
(
COLS
>
start_col
+
2
)
return
column
-
start_col
-
1
-
(
column
-
start_col
-
1
)
%
(
COLS
-
start_col
-
2
);
else
return
column
-
start_col
-
(
column
-
start_col
)
%
(
COLS
-
start_col
-
1
);
return
column
-
2
;
}
/* Reinitialize the cursor position in the status bar prompt. */
...
...
@@ -724,7 +725,8 @@ int do_prompt(bool allow_tabs,
va_start
(
ap
,
msg
);
vsnprintf
(
prompt
,
COLS
*
mb_cur_max
(),
msg
,
ap
);
va_end
(
ap
);
null_at
(
&
prompt
,
actual_x
(
prompt
,
(
COLS
<
4
)
?
0
:
COLS
-
4
));
/* Reserve five columns for colon plus dollars plus answer, ":$aa$". */
null_at
(
&
prompt
,
actual_x
(
prompt
,
(
COLS
<
5
)
?
0
:
COLS
-
5
));
func
=
acquire_an_answer
(
&
retval
,
allow_tabs
,
#ifndef DISABLE_TABCOMP
...
...
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