aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-31 22:26:20 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-31 22:26:20 +0530
commitc01857cddbc18798571f6d382e01e842684a491a (patch)
treee3ddf5d14adcc85d03904f413b5255af727493e8 /src
parent2d27902ac0e4f31c58d08aff3ba10f6a6d6af8e3 (diff)
downloadnnn-c01857cddbc18798571f6d382e01e842684a491a.tar.gz
Fix fzcd at /, minot refactor
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 942d950..8266882 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4617,10 +4617,7 @@ static void populate(char *path, char *lastname)
/* Find cur from history */
/* No NULL check for lastname, always points to an array */
- if (!*lastname)
- move_cursor(0, 0);
- else
- move_cursor(dentfind(lastname, ndents), 0);
+ move_cursor(*lastname ? dentfind(lastname, ndents) : 0, 0);
// Force full redraw
last_curscroll = -1;