[Lazarus] Persistent Blocks and Search, revisited

Jürgen Hestermann juergen.hestermann at gmx.de
Sat Sep 15 13:35:25 CEST 2012


Am 2012-09-15 13:20, schrieb Martin:
 > On 15/09/2012 11:53, Jürgen Hestermann wrote:
 >> It seems that an old issue with persistent blocks is back again in
 >> the editor of current Lazarus snapshots.
 >> I like to use persistent blocks but this is defeated
 >> by the fact that blocks are used as default string when invoking search.
 > (and I remember a recent post claiming it was different, but even then, when tested myself, it was not.)

Yes, that was me who was happy that it suddenly was fixed (though it seems it was not ;-))


 > The only time blocks (persistent or otherwise) are not used as default is if they are multiline.

Ahh! That could be the reason. I didn't know that this distinction is made. Yes, now that I test it it seems I only had a multiline block and that this was the reason for letting me think that it is fixed now.


 > The other option is to disable "Find text at cursor" in Options/Editor/Misc.

Why can't the block be ignored completely if it set persistent? I don't know for what reason a *single* line block is used for search but multiline is not (it could be used the first line). This arbitrary behaviour is very annoying. The predictable behaviour of *not* using any persistent block is much better.

 > Giving it some more thought (locking at the name of the option), the following change could be made. (applying only if "Find text at cursor" is on.
 > If the caret is outside the block, then the block is ignored.

Why that? In general, the cursor position is completely independend from a peristent block if I invoke search. I don't want to pay attention to this. It should work the same *all the time* (not only if the cursor is outside the block). The cursor only should decide about the search default (in all cases). Just ignore the block (if persistent).





More information about the Lazarus mailing list