<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Not 100% sure, have to go through the
code again. (Also you can add to
<a class="moz-txt-link-freetext" href="https://bugs.freepascal.org/view.php?id=33054">https://bugs.freepascal.org/view.php?id=33054</a> )<br>
Just throwing in a few quick notes.<br>
<br>
For string and comments<br>
<br>
procedure TSourceEditorManager.OnSourceCompletionTimer(Sender:
TObject);<br>
function CheckStartIdentCompletion: boolean;<br>
...<br>
if
SrcEdit.EditorComponent.GetHighlighterAttriAtRowCol(LogCaret,Token,Attri)<br>
and (Attri<>nil) and
(Attri.StoredName=SYNS_XML_AttrComment) then<br>
<br>
<blockquote type="cite">auto hide after the first character gets
deleted by backspace. </blockquote>
You mean the word becomes empty.<br>
Or the first char typed after the completion did open? (i.e. if
the I type Sou and completion only opens then, the hide when I
attempt to del part of the Sou?)<br>
<br>
In either case, there are various ways I can think of for
investigation, and we need to established which one is good.<br>
<br>
SourceEditor sees the typed chars in UserCommands (or the other
callback). SO it could interfere there.<br>
It could also be added as a callback to (I think that is the one):<br>
TSourceEditCompletion=class(TSynCompletion)<br>
<br>
<br>
Also what should happen, if during completion, other commands are
invoked <br>
ctrl-e for search as you type <br>
even ctrl-f<br>
(those already are an issue....)<br>
<br>
----------------------------<br>
If I am not mistaken (only had a very brief look at the patch)<br>
<br>
You currently have a global bool option: on/off?<br>
Would it be sensible to have a (separate) time delay. So if the
user types fast, it will not interfere?<br>
I seem to have thought of that as a necessity on the bug report.
But since I am not actually using this feature (even if avail), I
might be wrong. (Or maybe it was using a timeout, but the existing
one...)<br>
Equally there might be the (unnecessary) idea, to only trigger if
at least n chars of the current word have been typed?<br>
<br>
Testing with syncro-edit and multi-caret?<br>
The latter should probably disable it.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 20/08/2019 18:54, Darius Blaszyk via lazarus wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOOn3iS_OwXoEcG25C+W4oqocmpG9fG6=kXnxTHXVcNpD13h0w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Now with attachment! 😀<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 6:48
PM Darius Blaszyk <<a href="mailto:dhkblaszyk@gmail.com"
moz-do-not-send="true">dhkblaszyk@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Hi!</div>
<div><br>
</div>
<div>Attached a (still) naive patch that implements
automatic completion upon keypress. It's already giving me
a big boost in productivity so I thought I might share it
here. It would be good to make the identifier invocation a
bit smarter. For instance I would like to prevent
invocation in case the word is part of a string or
comment. Also it should auto hide after the first
character gets deleted by backspace. Any tips or hints how
to use the codetools to get the required information is
appreciated!</div>
<div><br>
</div>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>