mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Decouple statusbar redraw
This commit is contained in:
parent
fc00faf7d0
commit
bf2b8d8c84
12
src/nnn.c
12
src/nnn.c
|
@ -6171,7 +6171,7 @@ static int adjust_cols(int n)
|
||||||
return (n - 2);
|
return (n - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_line(char *path, int ncols)
|
static void draw_line(int ncols)
|
||||||
{
|
{
|
||||||
bool dir = FALSE;
|
bool dir = FALSE;
|
||||||
|
|
||||||
|
@ -6203,8 +6203,6 @@ static void draw_line(char *path, int ncols)
|
||||||
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
|
attroff(COLOR_PAIR(cfg.curctx + 1) | A_BOLD);
|
||||||
|
|
||||||
markhovered();
|
markhovered();
|
||||||
|
|
||||||
statusbar(path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void redraw(char *path)
|
static void redraw(char *path)
|
||||||
|
@ -6220,7 +6218,7 @@ static void redraw(char *path)
|
||||||
g_state.move = 0;
|
g_state.move = 0;
|
||||||
|
|
||||||
if (ndents && (last_curscroll == curscroll))
|
if (ndents && (last_curscroll == curscroll))
|
||||||
return draw_line(path, ncols);
|
return draw_line(ncols);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTF_S(__func__);
|
DPRINTF_S(__func__);
|
||||||
|
@ -6343,8 +6341,6 @@ static void redraw(char *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
markhovered();
|
markhovered();
|
||||||
|
|
||||||
statusbar(path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cdprep(char *lastdir, char *lastname, char *path, char *newpath)
|
static bool cdprep(char *lastdir, char *lastname, char *path, char *newpath)
|
||||||
|
@ -6503,8 +6499,10 @@ begin:
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
/* Do not do a double redraw in filterentries */
|
/* Do not do a double redraw in filterentries */
|
||||||
if ((presel != FILTER) || !filterset())
|
if ((presel != FILTER) || !filterset()) {
|
||||||
redraw(path);
|
redraw(path);
|
||||||
|
statusbar(path);
|
||||||
|
}
|
||||||
|
|
||||||
nochange:
|
nochange:
|
||||||
/* Exit if parent has exited */
|
/* Exit if parent has exited */
|
||||||
|
|
Loading…
Reference in a new issue