You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current cursor position is already present in '0 to '9, it is moved to '0, to avoid having the same position twice.
However, when I run :marks, I often see several duplicate entries (apparently resulting from quitting Vim with the same last file and location). This also got asked about on Stack Overflow.
To Reproduce
Detailed steps to reproduce the behavior:
$ rm /tmp/viminfo; for cmd in help\ {let,viminfo-file-marks,let,viminfo-file-marks}\|qa marks; do vim -u NONE -U NONE -i /tmp/viminfo -c "$cmd"; done
mark line col file/text
' 1 0
0 1552 7 /usr/local/share/vim/vim82/doc/starting.txt
1 11405 29 /usr/local/share/vim/vim82/doc/eval.txt
2 11405 29 /usr/local/share/vim/vim82/doc/eval.txt
3 1552 7 /usr/local/share/vim/vim82/doc/starting.txt
4 11405 29 /usr/local/share/vim/vim82/doc/eval.txt
" 1 0
Expected behavior
If deduplication would happen (as described in the help), I'd expect this:
mark line col file/text
' 1 0
0 1552 7 /usr/local/share/vim/vim82/doc/starting.txt
1 11405 29 /usr/local/share/vim/vim82/doc/eval.txt
" 1 0
In fact, that behavior is still present in Vim 7.4:
mark line col file/text
' 1 0
0 1443 7 /usr/share/vim/vim74/doc/starting.txt
1 8086 29 /usr/share/vim/vim74/doc/eval.txt
" 1 0
A bisect shows that this change is the culprit:
commit 2d35899
Author: Bram Moolenaar Bram@vim.org
Date: Sun Jun 12 21:20:54 2016 +0200
patch 7.4.1925
Problem: Viminfo does not merge file marks properly.
Solution: Use a timestamp. Add the :clearjumps command.
Environment (please complete the following information):
Vim version Vim 8.2.346, also Vim 8.0/1.
OS: Ubuntu 16.04 LTS 64-bit
Additional context
This is the script I've used for bisecting:
#!/bin/bash
rm /tmp/viminfo; for cmd in help\ {let,let,let,let,let,let,let,let,viminfo-file-marks,let,viminfo-file-marks}\|qa "if line(\"'3\") | cquit! | else | quitall! | endif"
do
command vim -u NONE -U NONE -i /tmp/viminfo --cmd "set viminfo='100" -c "$cmd"
done
The text was updated successfully, but these errors were encountered:
Describe the bug
From
:help viminfo-file-marks
:However, when I run
:marks
, I often see several duplicate entries (apparently resulting from quitting Vim with the same last file and location). This also got asked about on Stack Overflow.To Reproduce
Detailed steps to reproduce the behavior:
Expected behavior
If deduplication would happen (as described in the help), I'd expect this:
In fact, that behavior is still present in Vim 7.4:
A bisect shows that this change is the culprit:
Environment (please complete the following information):
Additional context
This is the script I've used for bisecting:
The text was updated successfully, but these errors were encountered: