On Thursday, June 6, 2013 3:08:24 AM UTC-5, Roland Eggner wrote:
> On 2013-06-05 Wednesday at 12:43 +0200 Bram Moolenaar wrote:
> 
> > Roland Eggner wrote:
> 
> > > After update 7.3.{865,969} I notice this regression:
> 
> > > “:wviminfo! filename” writes only new history entries, misses old
> 
> > > entries read by “:rviminfo! filename”.  “:history” shows old and new
> 
> > > entries properly, apart from the fact, that entries from viminfo
> 
> > > versions older than the previous one are missing (even far below the
> 
> > > history limit).  This renders the viminfo-feature almost useless for
> 
> > > my needs, I will go back to 7.3.865.
> 
> > > 
> 
> > > I tried to create minimalistic steps for reproduction of the problem
> 
> > > and found another error:  When starting with empty history and not
> 
> > > using “:rviminfo”, then history seems to remain empty for ever, and
> 
> > > “:history” fails with a surprising 
> 
> > > error message:
> 
> > > 
> 
> > > LC_MESSAGES=C vim -u NONE -c ':set nocompatible history=20' \
> 
> > >   -c ':echo "first history entry"' \
> 
> > >   -c ':set viminfo? history?' \
> 
> > >   -c ':history' \
> 
> > >   -c ':wviminfo! test.viminfo' \
> 
> > >   -c ':q'
> 
> > > --------------------------------------
> 
> > > first history entry
> 
> > >   viminfo='100,<50,s10,h
> 
> > >   history=20
> 
> > > 'history' option is zero
> 
> > 
> 
> > [...]
> 
> > 
> 
> > > Just in case “-u NONE” disables history, I tried the following 
> > > commandline and 
> 
> > > got the same result:
> 
> > > LC_MESSAGES=C vim -u /dev/null -i test.viminfo --noplugin \
> 
> > >   -c ':set nocompatible history=20' \
> 
> > >   -c ':echo "first"' \
> 
> > >   -c ':set viminfo?  history?' \
> 
> > >   -c ':history' \
> 
> > >   -c ':wviminfo! test.viminfo' \
> 
> > >   -c ':q'
> 
> > > 
> 
> > > 
> 
> > > Even repeating above vim commandline after inserting a history entry with 
> 
> > > following sed command yields the very same result:
> 
> > > sed -i -e '/Command Line History/a :echo "inserted by sed"' test.viminfo
> 
> > > 
> 
> > [...]
> 
> > 
> 
> > Thanks for reporting clearly.  I'll add this in the todo list.
> 
> Thanks.
> 
> 
> 
> > It's probably a matter of writing old entries when not reading back from
> 
> > an existing viminfo file.
> 
> I reported not clearly enough, I am afraid.  There are 2 probably related 
> bugs:
> 
> 
> 
> (1)  Commit “7.3.880  Problem:  When writing viminfo, old history lines may 
> 
> replace lines written more recently by another Vim instance.  Solution:  Mark 
> 
> history entries that were read from viminfo and overwrite them when merging 
> with 
> 
> the current viminfo.” turned the viminfo feature effectively to a “vimforget” 
> 
> feature.  The patch provided below reverts this. 

Certainly not the best solution.

The patch may have broken :wviminfo, but the normal method of writing and 
reading viminfo (on Vim enter and exit) is much more useful after the patch.

Before the patch, it was too easy to lose history when launching multiple Vim 
instances.

-- 
-- 
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/groups/opt_out.


Raspunde prin e-mail lui