Jon Crowe wrote:

> Under certain circumstances (see below for steps to reproduce) a
> session created by the :mksession command creates errors when
> attempting to load the session.
> 
> The circumstances are:
> 
>     There is a window with a split.
>     At least one of the buffers has a filename containing an apostrophe.
> 
> The steps to reproduce are as follows:
> 
>     vim -N -u NONE
>     :w x'x
>     :split
>     :w xx
>     :mksession
>     :qa
>     vim -N -u NONE -S
>     
> The errors are:
> 
> "x'x" 0L, 0C
> Error detected while processing /tmp/Session.vim:
> line  159:
> E116: Invalid arguments for function bufexists('x\'x') | buffer x\'x | else | 
> edit x\'x | endif
> E15: Invalid expression: bufexists('x\'x') | buffer x\'x | else | edit x\'x | 
> endif
> line  300:
> E171: Missing :endif
> 
> The offending line in the Session.vim file is:
> 
>     if bufexists('x\'x') | buffer x\'x | else | edit x\'x | endif
> 
> If I manually edit this line as follows:
> 
>     if bufexists('x''x') | buffer x\'x | else | edit x\'x | endif
> 
> the error disappears and the session loads without error and as expected.
> 
> I realise this is an obscure and minor bug, but I hope it is of some use to 
> report it. Thank you if you have the time or inclination to look into it. 
> Also thank you if you don't, as I love Vim anyway.
> 
> Other info that may be of use:
> 
> VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 05 2019 20:53:12)
> Included patches: 1-693
> 
> Running on Debian testing.
> 
> If there is any further information I have naively omitted that you
> need, please let me know.

I can reproduce it.  The session escaping code only works for a double
quoted string.  I'll make a fix.

-- 
TALL KNIGHT OF NI: Ni!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui