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


cat test.viminfo
----------------
# This viminfo file was generated by Vim 7.3.
# You may edit it if you're careful!

# Value of 'encoding' when this file was written
*encoding=utf-8


# hlsearch on (H) or off (h):
~h
# Command Line History (newest to oldest):

# Search String History (newest to oldest):

# Expression History (newest to oldest):

# Input Line History (newest to oldest):

# Input Line History (newest to oldest):

# Registers:

# File marks:

# Jumplist (newest first):

# History of marks within files (newest to oldest):


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


Regression probably caused by any of this commits:
--------------------------------------------------
hg log --template '{desc|tabindent}\n' --rev v7-3-969:v7-3-866 -k viminfo
updated for version 7.3.914
        Problem:    ~/.viminfo is messed up when running tests.
        Solution:   Set the viminfo filename.
updated for version 7.3.913
        Problem:    Still a crash when writing viminfo.
        Solution:   Add checks for NULL pointers. (Ron Aaron)
updated for version 7.3.905
        Problem:    Crash when writing viminfo. (Ron Aaron)
        Solution:   Prevent freed history info to be used.
updated for version 7.3.903
        Problem:    Crash on exit writing viminfo. (Ron Aaron)
        Solution:   Check for the history to be empty.
updated for version 7.3.892
        Problem:    Still mering problems for viminfo history.
        Solution:   Do not merge lines when writing, don't write old viminfo 
lines.
updated for version 7.3.891
        Problem:    Merging viminfo history doesn't work well.
        Solution:   Don't stop when one type of history is empty. Don't merge 
history
                    when writing viminfo.
updated for version 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.


COLUMNS=80 LC_MESSAGES=C vim --version
--------------------------------------
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun  4 2013 22:57:42)
Included patches: 1-969
Modified by Gentoo-7.3.969-<[email protected]_s/o/e/g>
Compiled by <[email protected]_s/o/e/g>
Huge version without GUI.  Features included (+) or not (-):
-arabic          -farsi           -mouse_netterm   +syntax
+autocmd         +file_in_path    -mouse_sgr       +tag_binary
-balloon_eval    +find_in_path    -mouse_sysmouse  +tag_old_static
-browse          +float           -mouse_urxvt     -tag_any_white
++builtin_terms  +folding         -mouse_xterm     -tcl
+byte_offset     -footer          +multi_byte      +terminfo
+cindent         +fork()          +multi_lang      +termresponse
-clientserver    +gettext         -mzscheme        +textobjects
-clipboard       -hangul_input    -netbeans_intg   +title
+cmdline_compl   +iconv           +path_extra      -toolbar
+cmdline_hist    +insert_expand   +perl            +user_commands
+cmdline_info    +jumplist        -persistent_undo +vertsplit
+comments        +keymap          -printer         +virtualedit
+conceal         +langmap         +profile         +visual
-cryptv          +libcall         +python          +visualextra
+cscope          +linebreak       -python3         +viminfo
+cursorbind      +lispindent      +quickfix        +vreplace
+cursorshape     +listcmds        +reltime         +wildignore
+dialog_con      +localmap        -rightleft       +wildmenu
+diff            -lua             -ruby            +windows
+digraphs        +menu            +scrollbind      +writebackup
-dnd             +mksession       +signs           -X11
-ebcdic          +modify_fname    +smartindent     -xfontset
+emacs_tags      -mouse           -sniff           -xim
+eval            -mouse_dec       +startuptime     -xsmp
+ex_extra        -mouse_gpm       +statusline      -xterm_clipboard
+extra_search    -mouse_jsbterm   -sun_workshop    -xterm_save
   system vimrc file: "/etc/vim/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 
-march=native -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: x86_64-pc-linux-gnu-gcc   -Wl,-E  -Wl,-O1 -Wl,--as-needed 
-L/usr/local/lib -Wl,--as-needed -o vim        -lm   -lcurses -ldl   -Wl,-E 
-Wl,-O1 -Wl,--as-needed  -L/usr/lib64/perl5/5.12.3/x86_64-linux/CORE -lperl 
-lnsl -ldl -lm -lcrypt -lutil -lc -L/usr/lib/python2.7/config -lpython2.7 
-lpthread -ldl -lutil -lm -Xlinker -export-dynamic

-- 
Regards
Roland Eggner

Attachment: pgpbfCesAt7CN.pgp
Description: PGP signature

Raspunde prin e-mail lui