Jason Franklin wrote:
> > Perhaps using :argadd works to create the buffers without actually
> > opening them or any other side effects. Then later reset the
> > argument list.
>
> I think it's even trickier than using :argadd. For example...
>
> vim --clean
> :argadd test.txt
> :e test.txt
>
> Notice that you're now editing buffer #2. This breaks the previous
> patch I submitted to avoid extra empty buffers when loading a session.
Wel already do use :argadd actually, when starting with "vim file1
file2". The first buffer is wiped out, we just don't have buffer number
one.
Not sure if there is any difference in using ":argadd" instead of
":badd". The loop over all buffers near the end of makeopens() could be
done much earlier. Or perhaps it needs to be done twice.
> Also, consider the case where several buffers are open and the user opens
> a session with :so Session.vim. Then, cycling through the buffers won't
> work anyway because there will be several buffers open from before the
> session was loaded.
In that case it's obvious the order will change. I think we only need
to care about saving a session, exit and opening Vim with the same
session. It should be functionally in the same state then.
> I'm unable to come up with perfect solutions to these issues at this time.
>
> However, the patch under discussion here seems obviously correct to me. The
> test here does a nice job of proving that the fix works, and should pass in
> all future changes to the session code to fix any of the other issues named
> here.
OK, I'll check it out.
--
The Feynman problem solving Algorithm:
1) Write down the problem
2) Think real hard
3) Write down the answer
/// 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201905222029.x4MKTc8l001098%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.