[Lazarus] caret on codetools renames [Re: Last-minute 0.9.28 nominations]
Martin
lazarus at mfriebe.de
Sat Sep 26 00:53:16 CEST 2009
Maxim Ganetsky wrote:
> One more candidate:
>
> 4) http://bugs.freepascal.org/view.php?id=12344 (Renaming a component
> will change the editor line number)
> This issue is not major but rather annoying.
>
There are pro and contra to this one:
- pro: one issue less
- pro: TextBetweenPoints will not be released, and changed to a slightly
changed implementation in the next release
- contra: the fix affects everything that uses "OnCodeBufferChanged"
(plus possible anything I have overlooked, even though I don't think I did)
OnCodeBufferChanged is used for *any* change that is originated by
codetools (except for identifier completion).
This includes the renaming, and insertions of components. Also the
insertions of units into uses. For those three it is correct not to move
the caret (or keep it in the text).
I don't know if there are any other changes originating through
OnCodeBufferChanged, and if any of them need the caret to move (havent
found any yet) => if there are, they are broken now.
If Mattias can confirm that OnCodeBufferChanged can always and safely
keep the caret where it is, then maybe ok, but otherwise....
(Codetooljumps, such as jump to error location are done elsewhere and
not affected)
Best Regards
Martin
More information about the Lazarus
mailing list