Closed ghost closed 7 years ago
Hm, can you check, if this patch fixes it:
diff --git a/autoload/recover.vim b/autoload/recover.vim
index b1653af..bb130db 100755
--- a/autoload/recover.vim
+++ b/autoload/recover.vim
@@ -110,7 +110,7 @@ fu! recover#ConfirmSwapDiff() "{{{1
" let wincmd = printf('-c "redir > %s|1d|:q!" ', tfile)
" let wincmd = printf('-c "call feedkeys(\"o\n\e:q!\n\")"')
" endif
- let cmd = printf("%s %s -u NONE -es -V %s %s",
+ let cmd = printf("%s %s -i NONE -u NONE -es -V %s %s",
\ (s:isWin() ? '' : 'TERM=vt100 LC_ALL=C'),
\ s:progpath,
\ (s:isWin() ? wincmd : ''),
No difference, unfortunately.
Now that I knew where to look, I found what appears to be the cause:
diff -ur .vim.old/autoload/recover.vim .vim/autoload/recover.vim
--- .vim.old/autoload/recover.vim 2016-10-01 14:20:29.221611463 +0100
+++ .vim/autoload/recover.vim 2016-10-01 14:20:55.082618673 +0100
@@ -147,7 +147,7 @@
if s:isWin()
let tfile = substitute(tfile, '/', '\\', 'g')
endif
- let cmd = printf("%s -u NONE -N %s -r %s -c \":w %s|:q!\" %s diff %s %s",
+ let cmd = printf("%s -i NONE -u NONE -N %s -r %s -c \":w %s|:q!\" %s diff %s %s",
\ s:progpath,
\ (s:isWin() ? '' : '-es'),
\ (s:isWin() ? fnamemodify(v:swapname, ':p:8') : shellescape(v:swapname)),
Which is odd, because I can see with some debugging that the cmd in your patch above is indeed being executed, but viminfo doesn't change at that point. The cmd in my patch is also being executed, and that's when viminfo changes. (I can tell when it changes because I put some sleeps just after the calls to system(cmd)).
Ah, this appears to mess up when recovering…
I've made both changes together and it seems OK. I'll create a pull request.
With 'history' greater than 50, and more than fifty entries for the command line history in .viminfo, opening the same file in two instances of Vim will reset the saved history to 50. The real world use case that I keep getting this is when I do a vimdiff with two files, one of which I have open already in some other Vim instance. I lose my older (but useful!) history.
With only "set history=5000" in vimrc, only Recover.vim installed, and more than fifty ":" entries in viminfo (
grep -c '^:' .viminfo
), steps to replicate:vim wibble
vim wibble
- the same file. The "Please choose:" prompt appears