I'm displaying a file contents by using :pedit …the-file-path…
, to then call popup_setoptions(…the-ID…,#{firstline:anumber})
in order to scroll the popup and highlight/show the desired part of the file.
There's however one problem — the folds are closed by default and thus they hide the file contents… How to open them?
What I've tried is a exe ':'.pupid.'windo norm! zi'
however the command fails upfront with and 'Invalid range` error. The pupid is being obtained via popup_findpreview() and is correct.
:pedit +set\ nofoldenable <file>
. – Christian Brabandt Sep 4 '20 at 12:47:pedit +set\ nofoldenable <file>
works too; IMO, it should be the accepted answer. – user938271 Sep 4 '20 at 13:49