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)
* 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;
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)
/* 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. */