Skip to content
  • Kai Willadsen's avatar
    meldbuffer: Move BufferLines to just use GTK+ line logic (#240) · 1be76337
    Kai Willadsen authored
    Over the years we've had many, many issues with GTK+ and Python
    disagreeing about what constitutes a line break. The actual bug that has
    prompted this rewrite is just another one in the long series of wild
    issues, but it's *so annoying* that rather than work through the insane
    logic I wrote before, I've just changed the whole approach and made our
    treat-my-textbuffer-as-a-list-of-lines shim use GTK+ APIs to do its line
    calculation logic.
    
    I'm was worried that this will be slow - it is after all a _lot_ more
    function calls and we're crossing through GObject introspection a bunch,
    but it... seems okay?
    
    One of the minor weird side-effects here is that this accessor
    absolutely enforces that regex filters only apply to a single line. I
    considered options for maintaining our very-broken status quo, but they
    were very, very difficult by comparison, and any multi-line filters
    are completely unsupported.
    1be76337