Zeno's Notes


Posts tagged find

2 notes

Padre: Improved Search Usability

One thing that was annoying me lately (not sure whether the problem existed before) was that you never saw the complete context of the search term you just found in Padre:

In that case, it annoyed me because I wanted to find some particular translatable strings that would occur together with sprintf. Well, in the case you see here I had to manually scroll down to see the string, which is never fun, and even less fun if the search window is modal (another thing I want to see gone in the near future).

The fix for this is actually very easy: just add the line

$editor->goto_pos_centerize( $start );
right before the text gets highlighted.

This is how the result looks like:

Much nicer, isn’t it? And it is just two one-line changes.

This makes the search in Padre a bit more usable for me, and I hope for others as well. If everything goes well, this improvement will ship with Padre 0.84.

Filed under padre perl perl5 modern perl editor ide usability search find fix