Re: Windows support



On Wed, Apr 15, 2009 at 12:01 PM, Piotr Piastucki
<leech miranda gmail com> wrote:
> Regarding the second patch - I have attached another version to the ticket,
> it does the same thing, but looks cleaner.
> Steps to reproduce the issue:
> - start 3-way diff (e.g. use the same file 3 times so no differences are
> highlighted)
> - removed a couple of lines from the file in the middle pane
> - go to the end of middle file - changes are incorrectly found between
> middle and right pane due to sequence size changed twice

Looks good. Ireproduced, and tested it fixes it.

BTW I'd do the first hunk of the first patch like that:

            def __getslice__(self, lo, hi):
                b = self.buf
                # Don't go too far if one file is bigger than the other
                if hi >= b.get_line_count():
                    hi_it = b.get_end_iter()
                else:
                    hi_it = b.get_iter_at_line(hi)
                txt = b.get_text(b.get_iter_at_line(lo), hi_it, 0)
                txt = self.textfilter(txt)
                return txt.split("\n")[:-1]

Less diff, less code, easier to understand, no ?
What do you think ?

-- 
Vincent Legoll


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