[Lazarus] After using TSynCompletion, the SynEdit dont want to write the first Char, but after the first Char all works
lazarus at mfriebe.de
Tue Nov 11 01:20:15 CET 2008
I haven't fully investigated this, put it may be related to the fact
that you install some custom onKeyPressed stuff.
The original procedure TSynCompletion.EditorKeyPress(Sender: TObject;
var Key: char);
if TRecordUsedToStoreEachEditorVars(fEditstuffs[i]^).NoNextKey then
key := #0;
TRecordUsedToStoreEachEditorVars(fEditstuffs[i]^).NoNextKey := false;
This procedure is still installed in Synedits OnKeyPress. So in theory
any first key, after completion is skipped
In Praxis, due to what is a likely bug (but different bug) in Synedit:
only spaces, upper-case chars and some punctuation is ignored.
In your example they are also ignored, if you finish completion, add
some lower case, and then try space or upper-case.
I have not tested, but you may get round the issue, by removing the
OnKeyPressed from Synedit, after SynCompletition did install it.
The better option is to find out, how to get SynCompletition to properly
Eugen Bolz wrote:
> Brad Campbell wrote:
>> Can you put together a simple program and upload it somewhere to demonstrate the fault?
> I have tested it again, it only dont works when SPACE is pressed, other
> CHARS are working.
> Select one Item, after that press SPACE and the SPACE-Char dont get
> added , only on second press it will be added.
> Also i have an other Question
> If i type 's' instead of 'S' the SynCompletionForm dont reacts, how can
> deactivate the Case-Sensitive? or to do a workaround that this
> SynCompletion works like in the IDE
> I hope it is understandable :)
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
More information about the Lazarus