Fix fzcd at /, minot refactor

This commit is contained in:
Arun Prakash Jana 2020-03-31 22:26:20 +05:30
parent 2d27902ac0
commit c01857cddb
No known key found for this signature in database
GPG key ID: A75979F35C080412
2 changed files with 6 additions and 5 deletions

View file

@ -32,5 +32,9 @@ if [ -n "$sel" ]; then
# Remove "./" prefix if it exists
sel="${sel#./}"
nnn_cd "$PWD/$sel"
if [ "$PWD" = "/" ]; then
nnn_cd "/$sel"
else
nnn_cd "$PWD/$sel"
fi
fi

View file

@ -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;