[Lazarus] After using TSynCompletion, the SynEdit dont want to write the first Char, but after the first Char all works
info at eugen-bolz.de
Tue Nov 11 13:41:27 CET 2008
Martin Friebe schrieb:
> 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
> Best Regards
Thank you, now it works with this Workaround,
procedure TForm1.ccExecute(Sender: TObject);
if FLastKeyPress <> nil then begin
but i have an other problems with SynCompletion , too
in the IDE i can type a 'c' or 'C' to select an item like 'Create', with
the Normal SynCompletion i have to use 'C' to select 'Create', someone
know something about this?
More information about the Lazarus