sfm

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

commit d19002b02b69fcff0cda7c9a61b799f0cfe15a83
parent 6aa138c1dd978e43b4f66dd0df94185389912eaf
Author: afify <hassan@afify.dev>
Date:   Tue, 14 Jul 2020 10:43:09 +0300

[fix] switch pane chdir

Diffstat:
Msfm.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sfm.c b/sfm.c @@ -963,6 +963,8 @@ start_ev(Pane *pane_l, Pane *pane_r) static void handel_press(struct tb_event *ev, Pane *cpane) { + chdir(cpane->dirn); /* TODO used to show symlink realpath */ + /* key require change directory or relist*/ char listkeys[] = "hlnND/"; @@ -984,12 +986,10 @@ outdir_press(struct tb_event *ev, Pane *cpane) (void)listdir(cpane, NULL); parent_row = 1; } else if (ev->ch == 'l') { -// cpane->direntr[cpane->hdir-1].name switch (check_dir(cpane->direntr[cpane->hdir-1].name)) { case 0: chdir(cpane->direntr[cpane->hdir-1].name); getcwd(cpane->dirn, MAX_P); -// strcpy(cpane->dirn, cpane->direntr[cpane->hdir-1].name); parent_row = (int)cpane->hdir; cpane->hdir = 1; (void)listdir(cpane, NULL);