Open IndianBoy42 opened 3 months ago
Context: fish
's command to edit the current commandline in place adds an argument of the form +autocmd VimLeave * ....
to write the cursor position to a file that fish can look at so it leaves the cursor at the same place when we return to the shell. First I saw this was causing errors because there were actually newlines in the middle which nvim_exec
does not handle nicely. Its fairly well known that to have multiline commands in vimscript you need to precede the continuation lines with \
, apparently not so when passing commands on the command line but anyway. After investigation I though it would be smart for flatten to assume this means the nested editor should block and add that autocmd to the nested session.
Hey, thanks for the PR! I am super busy right now so might not have a lot of time to review, but you've contributed before so I trust your judgement here.
Ping me when this is ready and I'll take a quick look and merge :)
I'll do a bit more test driving and see if anything weird happens
and apply that VimLeave autocmd to the nested nvim