[Lazarus] problem with form2.showmodal.

Héctor Fiandor Rosario hfiandor at infomed.sld.cu
Sun Sep 27 15:08:48 CEST 2009


Vincent Snijders пишет:
> Mattias Gaertner schreef:
>> On Fri, 25 Sep 2009 23:53:16 +0100
>> Martin <lazarus at mfriebe.de> wrote:
>>
>>> 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)
>>
>> Yes. That means if a line is inserted and the caret is behind then the 
>> caret
>> is moved accordingly. The caret should never move to the insert
>> position.
>> Some codetools functions make suggestions for new Caret, but it is up to
>> the calling function to apply it.
>>
> 
> So, I merged it.

Thanks. Hope it won't break things.

-- 
Best regards,
  Maxim Ganetsky                  mailto:ganmax at narod.ru




More information about the Lazarus mailing list