Closed majutsushi closed 13 years ago
Just in case it matters, this happens with git, I haven't tried any other VCSs yet to check whether it's the same there.
The signs are set on BufEnter and BufferWritePost events. Saving the buffer should thus update the signs. Keeping the signs up to date while editing (e.g. on CursorHold events) would require optimizations in quickfixsigns#vcsdiff#GetList().
Yes, I'm aware that the signs are only updated on those two events. The point is that when these updates happen they don't seem to be done correctly. A simple way to reliably reproduce it for me is this:
+
sign, but the lines added in step 4 don't have any signs, even though they too should have received them on save.This also doesn't change if I save the file again or make more changes somewhere and save, the lines added in step 4 will never receive the correct signs. Only doing a :bwipeout
(or restarting Vim) will make the signs appear correctly.
I've noticed a strange behaviour of the signs that indicate changes relative to the vcs state (i.e. the
+/-/=
markers). When I start vim and load a file that has some uncommitted changes the signs are correct, but the more I keep editing the file (and writing it) the less accurate the signs become: added lines don't get a+
sign, other signs are shown on the wrong line etc. Quitting Vim and loading the file again fixes this, but it's a bit annoying having no reliable signs while editing.