aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-06-27 23:48:23 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-06-27 23:48:23 +0530
commit06651f3f0073da34d15e8016183bd6be4b68bf5b (patch)
tree0c5840ce2b3518f7608ce9bb043060277530df96 /src
parent45d96ee60dabaaf66c03a9a743841f6a15f792ce (diff)
downloadnnn-06651f3f0073da34d15e8016183bd6be4b68bf5b.tar.gz
Fix build break
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/nnn.c b/src/nnn.c
index cb407df..2ffebaa 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5773,9 +5773,10 @@ nochange:
case SEL_HOME: // fallthrough
case SEL_END: // fallthrough
case SEL_FIRST:
- g_state.move = 1;
- if (ndents)
+ if (ndents) {
+ g_state.move = 1;
handle_screen_move(sel);
+ }
break;
case SEL_CDHOME: // fallthrough
case SEL_CDBEGIN: // fallthrough
@@ -6350,12 +6351,9 @@ nochange:
presel = 0;
/* Check if it's a dir or file */
- if (r == 'f') {
- mkpath(path, tmp, newpath);
- ret = xmktree(newpath, FALSE);
- } else if (r == 'd') {
+ if (r == 'f' || r == 'd') {
mkpath(path, tmp, newpath);
- ret = xmktree(newpath, TRUE);
+ ret = xmktree(newpath, r == 'f' ? FALSE : TRUE);
} else if (r == 's' || r == 'h') {
if (tmp[0] == '@' && tmp[1] == '\0')
tmp[0] = '\0';
@@ -6505,8 +6503,7 @@ nochange:
/* Repopulate as directory content may have changed */
goto begin;
case SEL_UMOUNT:
- tmp = ndents ? pdents[cur].name : NULL;
- if (!unmount(tmp, newpath, &presel, path))
+ if (!unmount((ndents ? pdents[cur].name : NULL), newpath, &presel, path))
goto nochange;
/* Dir removed, go to next entry */