Re: Detecting words

Andrew Truckle <[email protected]> Sat, 18 Jan 2025 07:42:21 -0800 (PST)
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
If I add:

m_edit.SetWordChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-");

Then yes, it returns the word including the hyphen. So I see a parameter 
list. But if I then choose a parameter and assign a value and hit space, 
not we show no list (as per my previous message).

Either there is design concept I need to take on board or something else. 
Or I am trying to achieve too much.

On Saturday, 18 January 2025 at 15:31:27 UTC Andrew Truckle wrote:

> Hi Matt
>
> I have not investigated that. Bu I now realise that even that is not 
> sufficient. For example:
>
> <xsl:variable name="happy" ^
>
> If I have typed the above and the cursor is now where the ^  is. At the 
> point I need to detect:
> 1. That the command is xsl:variable
> 2. That the name parameter has already been applied.
> 3. Display the Select value in the drop-list.
>
> My original idea will not work anyway. It would only work if I am on the 
> first parameter. So this is where I am getting confused. Whilst I can 
> display a function list, or a parameter list, I need to know the context. I 
> am not sure how to programatically work that out. Originally I though that 
> I could possibly use reg ex to find the function for the current text. eg: 
> search backword for xsl: and extract the text afterwards, in this case 
> "variable". This would give me the function for showing the parameter list. 
> But I don't know how. 
>
> On Saturday, 18 January 2025 at 15:05:57 UTC Matt Gilarde wrote:
>
>> Have you used SCI_SETWORDCHARS to set the characters which comprise words 
>> and included "-"? Scintilla Documentation 
>> <https://scintilla.org/ScintillaDoc.html#SCI_SETWORDCHARS>
>>
>> Scintilla Documentation
>>
>> <https://scintilla.org/ScintillaDoc.html#SCI_SETWORDCHARS>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/cef844a8-5fb3-4996-b539-bb8639356324n%40googlegroups.com.