This patch makes jumps go the the first/last hunk when the given count
was bigger than the available hunks.
E.g. when there are only 2 hunks and you use 4]c, the cursor jumps to
the last hunk nevertheless. Before this patch the cursor wouldn't move
at all (which mimics the standard behaviour of ]c/[c).
Closes#41.
If jump next hunk with no count, it move last hunk of below hunks.
v:count step is 0, 2, 3, 4..., so if no count is specified, next hunk is
-1(this is last hunk of below hunks). Because of above reason, I change
to use v:count1 instead of v:count. v:count1 step is 1, 2, 3, 4... .
Closes#40.
Instead of using the sign id as the primary piece of data, store
information on a per-hunk granularity. A hunk has a start/end line as
well as a set of sign ids that have been placed within those lines.
This makes moving to the start of the next/previous hunk, as per the
behavior of the standard `]c`/`[c` bindings, pretty straight forward --
a simple filter to find relevant hunks, and then grab the first sign id.
In certain cases the code that gets triggered by BufDelete would use
the wrong s:path due to a racing problem.
Thanks to @techlivezheng for the feedback.
Closes#30.
Some VCS rely on an external diff tool, because they don't support the
-U0 flag natively. Most of the time that's the standard 'diff' utility.
But fritzophrenic was reporting that even a GNU diff won't always be
installed as 'diff', but e.g. as 'gnudiff' instead.
You can set the external diff tool now.
Closes#29.