}
if (*bms == ';') {
+ /* Remove trailing space */
+ if (i > 0 && *(bms - 1) == '/')
+ *(bms - 1) = '\0';
+
*bms = '\0';
nextkey = bms + 1;
}
static void redraw(char *path)
{
static char buf[NAME_MAX + 65] __attribute__ ((aligned));
+ char c;
size_t ncols = COLS;
int nlines = MIN(LINES - 4, ndents), i, attrs;
return;
}
- /* Strip trailing slashes */
- for (i = strlen(path) - 1; i > 0; --i)
- if (path[i] == '/')
- path[i] = '\0';
- else
- break;
-
DPRINTF_D(cur);
DPRINTF_S(path);
- if (!realpath(path, g_buf)) {
- printwarn();
- return;
- }
-
if (ncols > PATH_MAX)
ncols = PATH_MAX;
attron(A_UNDERLINE);
/* No text wrapping in cwd line */
- g_buf[ncols - 11] = '\0';
- printw("%s\n\n", g_buf);
+ c = path[ncols - 11];
+ path[ncols - 11] = '\0';
+ printw("%s\n\n", path);
attroff(A_UNDERLINE);
+ path[ncols - 11] = c;
/* Fallback to light mode if less than 35 columns */
if (ncols < 35 && cfg.showdetail) {
/* Calculate the number of cols available to print entry name */
if (cfg.showdetail)
- ncols -= 36;
+ ncols -= 35;
else
ncols -= 5;