Re: "static/fixed" mode on file diff view



Hello,

I have added an initial (broken) support for 3-way in the attached
patch and at github [1]. But I need some help to move on:

1. Where to do the tag creation/update logic (still)

I've moved the logic to the on_diffs_changed callback because I need
the set of chunks that had been changed. But it appears that I can't
do this at that point because the textview has not been refreshed yet,
neither yranges that are needed for the padding logic. So this is
currently broken when some text change affects yranges
(adding/removing of newline, line wrap etc). Adding a subsequent space
usualy fix things.

For my logic to work I would need:

* The set of changed chunks (the ones to update the padding).
* refreshed textview so yranges are ok.

I tried to save the changed_chunks on diffs_changed to later process
on on_textview_expose_event. But the first call happens before the
yranges gets updated, and there are many calls even without text
edition.

Any thougths?

2. Complete line ranges for 3-way diffs

To support 3-way diffs I have to know the line ranges on all three
panes for each chunk so I can create the padding tags. However,
diffutils only provides line ranges for the panels that differs. For
chunks that are identical between two consecutive panes, I don't have
the line range for one of them.

I took a look at diffutils but it doesn't seem simple enough for me to
adapt. Any suggestions?

3. Other bugs

I have noticed many other bugs. Mainly when diffs change in such a way
that the line with padding gets lost of track or when diffs split. But
I believe this comes next.

Thanks.

[1]: https://github.com/pedrox/meld/tree/poc-fixed-scroll-3

ızznɹpǝԀ oɹpǝԀ

Attachment: poc-fixed-scroll-3.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]