tomtom / quickfixsigns_vim

Mark quickfix & location list items with signs
http://www.vim.org/scripts/script.php?script_id=2584
GNU General Public License v3.0
131 stars 13 forks source link

vcsdiff: make signs more sensible #34

Closed Chronial closed 11 years ago

Chronial commented 11 years ago

VCS diff signs will now mark a change not just on one line, but on as many lines as have been deleted for the change, up to the number of lines that have been added. So if you replace 5 lines with 7 lines, you will get 5 CHANGED signs followed by 2 ADDED signs. If you replace 5 lines with 3 lines, you will get 3 CHANGED signs.

There are also quite a few changes to the balloon message:

So in summary the message for every change in a change block will be the hunk header, followed by all of the deleted lines.

This will look horrible on systems without multiline balloons. But according to the vim source, only unpatched win95 systems have no multiline balloons.

Further the memory usage of the balloons is very wasteful as the block message is replicated for every line. Worst case is a completely rewritten file where the memory usage for this will be line-count * file-size. But this is a rare scenario and should still be fine on a semi-modern machine.

Chronial commented 11 years ago

Thanks :). I understand your skepticism as this is a rather extensive change. But give it a try for some time – I think this makes way more sense and is also the only way I have ever seen this be done (mainly eclipse and diff -y).