mirror of
https://github.com/jarun/nnn.git
synced 2025-03-18 20:39:45 +00:00
Fix hovered marking on empty directory
This commit is contained in:
parent
3316e2acdb
commit
1fabac27ba
1 changed files with 10 additions and 8 deletions
18
src/nnn.c
18
src/nnn.c
|
@ -5726,6 +5726,14 @@ static void statusbar(char *path)
|
||||||
tocursor();
|
tocursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void markhovered(void)
|
||||||
|
{
|
||||||
|
if (cfg.showdetail && ndents) { /* Reversed block for hovered entry */
|
||||||
|
tocursor();
|
||||||
|
addch(' ' | A_REVERSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int adjust_cols(int n)
|
static int adjust_cols(int n)
|
||||||
{
|
{
|
||||||
/* Calculate the number of cols available to print entry name */
|
/* Calculate the number of cols available to print entry name */
|
||||||
|
@ -5777,10 +5785,7 @@ static void draw_line(char *path, int ncols)
|
||||||
if (dir)
|
if (dir)
|
||||||
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
|
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
|
||||||
|
|
||||||
if (cfg.showdetail) { /* Reversed block for hovered entry */
|
markhovered();
|
||||||
tocursor();
|
|
||||||
addch(' ' | A_REVERSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
statusbar(path);
|
statusbar(path);
|
||||||
}
|
}
|
||||||
|
@ -5904,10 +5909,7 @@ static void redraw(char *path)
|
||||||
addch('v');
|
addch('v');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.showdetail) { /* Reversed block for hovered entry */
|
markhovered();
|
||||||
tocursor();
|
|
||||||
addch(' ' | A_REVERSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
statusbar(path);
|
statusbar(path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue