mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
Eliding a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4833 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
794956f7e0
commit
0c3ced0d00
@ -1,3 +1,6 @@
|
||||
2014-05-04 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/winio.c (statusbar): Elide a variable.
|
||||
|
||||
2014-05-03 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/*.h, src/*.c: Add the ability to colour four elements of
|
||||
nano's interface differently: title bar, status bar, key combo,
|
||||
|
@ -2272,7 +2272,7 @@ void statusbar(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *bar, *foo;
|
||||
size_t start_x, foo_len;
|
||||
size_t start_x;
|
||||
#if !defined(NANO_TINY) && !defined(DISABLE_NANORC)
|
||||
bool old_whitespace;
|
||||
#endif
|
||||
@ -2297,13 +2297,12 @@ void statusbar(const char *msg, ...)
|
||||
vsnprintf(bar, mb_cur_max() * (COLS - 3), msg, ap);
|
||||
va_end(ap);
|
||||
foo = display_string(bar, 0, COLS - 4, FALSE);
|
||||
free(bar);
|
||||
#if !defined(NANO_TINY) && !defined(DISABLE_NANORC)
|
||||
if (old_whitespace)
|
||||
SET(WHITESPACE_DISPLAY);
|
||||
#endif
|
||||
free(bar);
|
||||
foo_len = strlenpt(foo);
|
||||
start_x = (COLS - foo_len - 4) / 2;
|
||||
start_x = (COLS - strlenpt(foo) - 4) / 2;
|
||||
|
||||
wmove(bottomwin, 0, start_x);
|
||||
wattron(bottomwin, interface_color_pair[STATUS_BAR]);
|
||||
|
Loading…
Reference in New Issue
Block a user