Peter Odding wrote:

> Hi list,
> 
> I'm writing a Vim plug-in that's sort of like :mksession on steroids. 
> When I realized how difficult it would be to reproduce any given split 
> window lay-out in Vim script commands I decided to take the easy way out 
> and use :mksession since it does this flawlessly already! But then I 
> found a problem in the session script generated by :mksession. This is 
> using the latest Vim 7.2 including patches 1-444.
> 
> The problem is that the session script includes an :args command that 
> sets the argument list to one filename, which is fine, but then later 
> the session script also executes the command "2argu" several times, 
> which causes Vim to show the error "E163: There is only one file to 
> edit" once for each occurrence of "2argu". I searched the archives for 
> :mksession + E163 and found one previous thread about the same problem 
> at http://old.nabble.com/session-problem-td27813363.html#a27814733 but 
> that thread doesn't end with a solution.
> 
> I think I've found the cause to be a typo in ex_docmd.c where the 
> expression wp->w_arg_idx <= WARGCOUNT(wp) should have been wp->w_arg_idx 
> < WARGCOUNT(wp) (lower than instead of lower than or equal). After 
> applying the attached patch and recompiling Vim I can no longer 
> reproduce the problem described above, however I must admit that I 
> failed to reliably reproduce the problem in the first place, it would 
> just occur once in a while when I was testing my session plug-in.

Looks like a good fix.  I'll include it, thanks!

-- 
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
 - Einstein

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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

Raspunde prin e-mail lui