On Tue, Jun 13, 2017 at 10:48 AM, Junio C Hamano <[email protected]> wrote:
>
> I never said "start and end" (you did). I just wanted the boundary
> of A and B and C clear, so I'd be perfectly happy with:
>
> context
> +A dim
> +A dim
> +A highlight #1
> +C highlight #2
> +B highlight #1
> +B dim
> +B dim
> context
>
> You can do that still with only two highlight colors, no?
So to put it into an algorithm:
1) detect blocks
2) if blocks are adjacent, their bounds are eligible for highlighting
3) the highlighting is implemented using the "alternate" strategy
in that any line highlighted belonging to a different block flips
the highlighting, such that:
context
+A dim
+A dim
+A highlight #1
+B highlight #2
+B dim
+B dim
context
So if we go this way, we would need indeed 6 colors:
Dimmed, Highlighted, HighlightedAlternative
color-moved modes:
nobounds::
uses dimmed only
allbounds::
adjacentbounds::
See algorithm above, using dimmed for inside the block and
both highlights for bounds, making sure adjacent block bounds
alternate the highlighting color.
alternate::
Uses only highlighting colors, complete block is colored with
one of the highlights
I think that is reasonable to implement. But I do still wonder if
we really want to add so many new colors.
I'll give it a try after my next submodule series.
Thanks,
Stefan