This is developed on top of 4a68b95ce2a6 (your series here) This is an attempt to explain the previous email better, specially the second (yet unfinished) patch, but the resulting emit_line_0 is way clearer in my mind, dropping the 'first' character and instead having a 'char *sign' that (a) we can color differently for dual color and (b) can have multiple chars, the refactoring for the multiple chars would need to happen at a slightly higher level. Feel free to draw inspiration from here, but if not that is fine, too (as I did not fully understand the word diffing problem yet, this may add a burden instead of just taking these patches). I can send up a cleanup series after yours lands, as well. Thanks, Stefan Stefan Beller (2): diff.c: convert emit_line_ws_markup to take string for sign WIP diff.c: clarify emit_line_0 diff.c | 84 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 40 insertions(+), 44 deletions(-) -- 2.18.0.203.gfac676dfb9-goog