On 08.10.2015 22:53, Kai Willadsen wrote:
On 7 October 2015 at 06:00, David Rabel <David Rabel noresoft com> wrote:...Awesome! Could you please just make a note on that page that you're looking at it so that no one else tries to pick it up at the same time?
I wasn't sure what to write. Is it okay as I did?
...Sure. Pretty much any of our options *might* conflict with something applied by a style scheme, so we just have to live with that. The vast majority of style schemes set no background colours, so that's a fairly reliable fallback if we want it. I'm also not too worried about overwriting the style scheme's foreground colours, since what we're indicating in code is unlikely to be overwriting important syntax highlighting annotations (i.e., you're probably not writing a regex to ignore function definitions or language keywords). So for now, I'd ignore the issue of conflicting with style schemes and make the drawing something that will definitely work, e.g., a light grey foreground text colour.
You are right. Attached you find my grey-proposal. :-)
I'm not sure if you were done with it, but that patch doesn't quite do the right thing when you get multiple ignored regions. I think the problem is that the _filter_text changes assume that it's only called with the whole file, but we actually call it whenever we request a slice from meldbuffer.BufferLines (which is quite a bit). I think you'll have to change the _filter_text call to take buffer offsets from the slice call and do offset calculations from there.
I tried to fix this issue. I think it is correct, but maybe you could have a closer look at it, because I was not able to reproduce the problem reliably. Therefore I'm not sure, if I am lucky or it is fixed. ;-) I have one more problem: I don't really understand how the groups()-thing in killit() is supposed to work. At the moment for each subgroup which did contribute to the match, it filters all occurrences of the last match of this subgroup. For example I used the pattern (\d)*(\d). If I filter the string "12341234" it matches the whole string, but the last occurrences of the subgroups are "3" and "4", so all "3"s and "4"s are filtered off and after that it remains "1212". That does not seem to make a lot of sense. At least I don't understand it. :-D I did write some not-so-beautiful lines that dim exactly what is filtered out thou, because it was easier to see what is going on, when I could really visually see it. Regards, David
Attachment:
grey_diff
Description: Text document