[Lazarus] Persistent Blocks and Search, revisited

Martin lazarus at mfriebe.de
Sat Sep 15 13:20:52 CEST 2012


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.
> Some time ago this was not the case anymore (with some older build)
> but now it is back again at least with the last two snapshots I
> installed (the last one today).
>
> Anybody knows about this and/or has changed it back?

Afaik it was always the case (and I remember a recent post claiming it 
was different, but even then, when tested myself, it was not.)
The only time blocks (persistent or otherwise) are not used as default 
is if they are multiline.

The other option is to disable "Find text at cursor" in 
Options/Editor/Misc.   However this will also affect using the current 
word at cursor, if there is no selection.

----
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.
It could also be , if the caret is not at one of the exact borders of 
the block. But given that we are only looking at one line blocks anyway, 
and that "being in the middle of the block" makes the block a "text at 
cursor", I prefer the limit of "outside the block" (imho more logical 
and intuitive)

----
For all else, I can accept a patch that adds an explicit option 
(applying to persistent and otherwise)








More information about the Lazarus mailing list