mirror of
https://github.com/jarun/nnn.git
synced 2024-11-14 03:16:01 +03:00
Fix fzcd at /, minot refactor
This commit is contained in:
parent
2d27902ac0
commit
c01857cddb
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user