word part autocompletion

4 views
Skip to first unread message

Nick Treleaven

unread,
Oct 15, 2009, 12:21:19 PM10/15/09
to scintilla...@googlegroups.com
Hi,
I've made the Geany IDE autocomplete parts of words in the AC list (up
to an underscore or upper-case letter) when pressing tab, but I modified
scintilla to do so.

Would you accept a patch for a SCI_AUTOCGETCURRENTTEXT message? If so I
assume it should take buffer and buffer_len arguments rather than
return allocated memory?

It seems messy to use the SCI_AUTOCGETCURRENT index to scan through the
autocompletion string.

Regards,
Nick

Neil Hodgson

unread,
Oct 16, 2009, 5:45:44 AM10/16/09
to scintilla...@googlegroups.com
Nick Treleaven:

> Would you accept a patch for a SCI_AUTOCGETCURRENTTEXT message?

Yes.

> If so I
> assume it should take buffer and buffer_len arguments rather than
> return allocated memory?

The convention is to copy into a char* lParam assuming that the
buffer is long enough, returning the length (not including the
terminating \0). If the lParam is NULL then no copying is performed
but the length is still returned, allowing the container to allocate a
buffer.

Neil

Nick Treleaven

unread,
Oct 16, 2009, 12:06:31 PM10/16/09
to scintilla...@googlegroups.com

OK thanks (I should have read the manual more thoroughly ;-)).

Please see patch attached.

Regards,
Nick

SCI_AUTOCGETCURRENTTEXT.patch

Neil Hodgson

unread,
Oct 18, 2009, 6:03:45 PM10/18/09
to scintilla...@googlegroups.com
Nick Treleaven:

> Please see patch attached.

OK, committed.

Neil

Reply all
Reply to author
Forward
0 new messages