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
21cb01e5
Commit
21cb01e5
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename two variables, to make some sense
And move a statement to a better place.
parent
ea9aaee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+14
-15
src/winio.c
with
14 additions
and
15 deletions
+14
-15
src/winio.c
View file @
21cb01e5
...
...
@@ -1956,7 +1956,7 @@ void statusbar(const char *msg)
void
statusline
(
message_type
importance
,
const
char
*
msg
,
...)
{
va_list
ap
;
char
*
bar
,
*
foo
;
char
*
compound
,
*
message
;
size_t
start_x
;
bool
bracketed
;
#ifndef NANO_TINY
...
...
@@ -1994,25 +1994,22 @@ void statusline(message_type importance, const char *msg, ...)
blank_statusbar
();
bar
=
charalloc
(
mb_cur_max
()
*
(
COLS
+
1
));
vsnprintf
(
bar
,
mb_cur_max
()
*
(
COLS
+
1
),
msg
,
ap
);
/* Construct the message out of all the arguments. */
compound
=
charalloc
(
mb_cur_max
()
*
(
COLS
+
1
));
vsnprintf
(
compound
,
mb_cur_max
()
*
(
COLS
+
1
),
msg
,
ap
);
va_end
(
ap
);
foo
=
display_string
(
bar
,
0
,
COLS
,
FALSE
);
free
(
bar
);
message
=
display_string
(
compound
,
0
,
COLS
,
FALSE
);
free
(
compound
);
#ifndef NANO_TINY
if
(
old_whitespace
)
SET
(
WHITESPACE_DISPLAY
);
#endif
start_x
=
(
COLS
-
strlenpt
(
foo
))
/
2
;
start_x
=
(
COLS
-
strlenpt
(
message
))
/
2
;
bracketed
=
(
start_x
>
1
);
wmove
(
bottomwin
,
0
,
(
bracketed
?
start_x
-
2
:
start_x
));
wattron
(
bottomwin
,
interface_color_pair
[
STATUS_BAR
]);
if
(
bracketed
)
waddstr
(
bottomwin
,
"[ "
);
waddstr
(
bottomwin
,
foo
);
free
(
foo
);
waddstr
(
bottomwin
,
message
);
free
(
message
);
if
(
bracketed
)
waddstr
(
bottomwin
,
" ]"
);
wattroff
(
bottomwin
,
interface_color_pair
[
STATUS_BAR
]);
...
...
@@ -2023,10 +2020,12 @@ void statusline(message_type importance, const char *msg, ...)
suppress_cursorpos
=
TRUE
;
/* If we're doing quick statusbar blanking, blank it after just one
* keystroke. Otherwise, blank it after twenty-six keystrokes, as
* Pico does. */
#ifndef NANO_TINY
if
(
old_whitespace
)
SET
(
WHITESPACE_DISPLAY
);
/* If doing quick blanking, blank the statusbar after just one keystroke.
* Otherwise, blank it after twenty-six keystrokes, as Pico does. */
if
(
ISSET
(
QUICK_BLANK
))
statusblank
=
1
;
else
...
...
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