Back action in `FzfxFileExplorer` does not restore cursor position
savchenko opened this issue · 1 comments
savchenko commented
When moving up one level, I'd expect cursor to be positioned on the folder I have just exited.
Currently it tends to jump towards the beginning of the file listing.
linrongbin16 commented
looks like current engine cannot support such use case. ~ _ ~!
For now the cd
and upper
keys are Interactions, and engine is running follow below steps when you press cd
or upper
keys:
- running the lua script with the
nvim -l xxx.lua
shell command, which is binding to thefzf
binary when launch theFzfxFileExplorer
popup window. - inside the
xxx.lua
lua script, send request to the nvim editor (e.g. the parent process of thexxx.lua
), to ask nvim editor to do the interactions, e.g. thecd
andupper
lua function hooks. - refresh provider/previewer, e.g. refresh the searching results and preview new results.
To restore the cursor position, it need to execute the pos
fzf actions (see: https://man.archlinux.org/man/fzf.1.en#AVAILABLE_ACTIONS: , the pos
actions) after refreshing searching results.
Looks like we have add 1 more hooks to emit the pos
fzf actions after refresh search results (also maintain the engine architecture clean).