Closed AinTEAsports closed 3 months ago
You should try patches/restorepreview/mainline.diff. It fixed the issue for me, at least.
Looks like it does nothing in my case.
Maybe related: https://github.com/jarun/nnn/discussions/1809
I'm pretty sure restorepreview only applies to the internal editor, pressing e, enter handles it with your opener, nuke etc.
# Description: Adds preview pipe to enable closing and re-opening the preview pane when running an undetached editor.
I just copied the toggle_preview from preview_tui in a wrapper that kills the preview and uses tmux to reenable it
then all you have to do to toggle it for any plugin is
source toggle_prev
run_cmd do stuff here
If you wanted it to toggle on file open you'd have to make a custom opener or edit nuke to do something similar, I just open vim in a new tmux window
Correct, the restorepreview patch hides and restores preview-tui when opening and closing an attached editor. I guess I didn't consider the case for forked programs since we don't know when it closes, or when it makes sense to restore preview-tui.
Despite that, I suppose closing preview-tui unconditionally when a file is opened can make sense as well. Not sure if it makes sense to change the restorepreview patch at this point, although I wouldn't mind it.
Since there hasn't been any response from @AinTEAsports and there has been a proposed solution I'll close this as stale.
Feel free to reopen if you want further discussion and to work on this topic.
Environment details (Put
x
in the checkbox along with the information)-Adeo -Pp
export NNN_PLUG='f:finder;o:fzopen;m:mocq;d:diffs;t:nmount;v:imgview;p:preview-tui;c:fcd'
nnn
masterExact steps to reproduce the issue
nnn -Adeo -Pp
(so that it starts with preview files)The pane showing the preview is not closed on opening of vim (I did not tried to reproduce the bug with any other editor than vim).