in titlebar(), don't display any blank space for the state if we're in
the file browser, as Pico doesn't, and since path is always assumed to be NULL if DISABLE_BROWSER is defined, put the check for its being NULL in a DISABLE_BROWSER #define git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
d59c42363b
commit
7f3fdb4790
|
@ -89,6 +89,11 @@ CVS code -
|
|||
titlebar()
|
||||
- Don't display overly long filenames with ellipses if the
|
||||
number of columns is extremely small. (DLR)
|
||||
- Don't display any blank space for the state if we're in the
|
||||
file browser, as Pico doesn't. (DLR)
|
||||
- Since path is always assumed to be NULL if DISABLE_BROWSER is
|
||||
defined, put the check for its being NULL in a DISABLE_BROWSER
|
||||
#define. (DLR)
|
||||
- doc/syntax/c.nanorc:
|
||||
- Since .i and .ii are preprocessed C and C++ output, colorize
|
||||
them here. (Mike Frysinger)
|
||||
|
|
10
src/winio.c
10
src/winio.c
|
@ -1964,7 +1964,7 @@ void titlebar(const char *path)
|
|||
* buffer. */
|
||||
size_t statelen = 0;
|
||||
/* The length of the state in columns, or the length of
|
||||
* "Modified" if the state is blank. */
|
||||
* "Modified" if the state is blank and path is NULL. */
|
||||
char *exppath = NULL;
|
||||
/* The filename, expanded for display. */
|
||||
bool newfie = FALSE;
|
||||
|
@ -2010,7 +2010,11 @@ void titlebar(const char *path)
|
|||
state = openfile->modified ? _("Modified") : ISSET(VIEW_MODE) ?
|
||||
_("View") : "";
|
||||
|
||||
statelen = strlenpt((state[0] != '\0') ? state : _("Modified"));
|
||||
statelen = strlenpt((state[0] == '\0'
|
||||
#ifndef DISABLE_BROWSER
|
||||
&& path == NULL
|
||||
#endif
|
||||
) ? _("Modified") : state);
|
||||
|
||||
/* If possible, add a space before state. */
|
||||
if (space > 0 && statelen < space)
|
||||
|
@ -2038,7 +2042,9 @@ void titlebar(const char *path)
|
|||
|
||||
/* If we're not in the file browser, path should be the current
|
||||
* filename. */
|
||||
#ifndef DISABLE_BROWSER
|
||||
if (path == NULL)
|
||||
#endif
|
||||
path = openfile->filename;
|
||||
|
||||
/* Account for the full lengths of the prefix and the state. */
|
||||
|
|
Loading…
Reference in New Issue