Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
ago in vifm by
edited ago by

when i set as vsplit two panes mode, and run :view command to start the quick view for the directory, it only shows [...], maybe tree info directory can be shown after long time.

But there is no problem for the file preview, only happens for the directory, no matter whether if set fileview */,.*/ in vifmrc.

and also there is no problem when using single pane mode.

btw the previewoptions is set as below with the latest vifm version:

set previewoptions=graphicsdelay:30000,maxtreedepth:3,toptreestats

1 Answer

0 votes
ago by
 
Best answer

it only shows [...]

This suggests you're not using builtin directory preview but invoking an external command. Show contents of the :fileviewer /etc menu to identify what that command is.

You either want to exclude directory from a particular preview command or adjust it (e.g., limit recursion depth).

ago by

Thanks for the quick answer.

Actually this issue only happens when I use two pane mode (:vsplit or :split), and as i checked, the CPU is apprarently higher when running the :view command to preview the directory.

btw, when i run :fileviewer /etc, it shows the below in the cmdline:
no viewers match /etc

when i run :fileview /etc/ (with suffix slash), it shows the below in the menu:
[Present] tree -L 2 -C --dirsfirst %c

After many testing tries, i finnaly found the config parameter which causes this issue.

once i set the below config:
set previewoptions=graphicsdelay:30000,maxtreedepth:3,toptreestats
to the below one:
set previewoptions=graphicsdelay:30000

then this issue is resolved, but i don't know why.
and i also tried to limit maxtreedepth:1, it also has this issue.

ago by

Actually this issue only happens when I use two pane mode (:vsplit or :split), [...]

Previewing using e is synchronous, which makes a difference.

btw, when i run :fileviewer /etc, it shows the below in the cmdline:
no viewers match /etc

Right, forgot about the slash.

then this issue is resolved, but i don't know why.

The bug is with checking whether cached preview is up to date. It takes values of options into account but incorrectly remembers them only for builtin preview case, hence non-zero maxtreedepth or enabled toptreestats making a difference. This results in drawing and immediately discarding the output indefinitely, the real output doesn't stay long so it looks like [...]. Thank you for finding the bug!

...