sfm

simple file manager
git clone git://git.afify.dev/sfm
Log | Files | Refs | README | LICENSE

commit e8ae66847594cdb994d1cfdbf255344877382916
parent 2a4270858ad58f484aeeba36b5ff054f6ecd7bb2
Author: afify <hassan@afify.dev>
Date:   Mon,  7 Dec 2020 09:48:44 +0300

[fix] listdir both panes when filesystem event

Diffstat:
Msfm.c | 20+++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/sfm.c b/sfm.c @@ -1710,9 +1710,23 @@ start_ev(void) else if (t == 2) /* resize event */ t_resize(); else if (t == 0) /* filesystem event */ - if (read_events() > 0) - if (listdir(AddHi, NULL) < 0) - print_error(strerror(errno)); + if (read_events() > 0) { /* TODO need refactoring */ + if (cpane == &pane_l) { + cpane = &pane_r; + if (listdir(NoHi, NULL) < 0) + print_error(strerror(errno)); + cpane = &pane_l; + if (listdir(AddHi, NULL) < 0) + print_error(strerror(errno)); + } else if (cpane == &pane_r) { + cpane = &pane_l; + if (listdir(NoHi, NULL) < 0) + print_error(strerror(errno)); + cpane = &pane_r; + if (listdir(AddHi, NULL) < 0) + print_error(strerror(errno)); + } + } tb_present(); continue;