Re: Colorizing braces using indicators

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
Actually, I wrote my code first and since I knew you could get the line 
state from within the lexer, I figured there was a way to set an indicator 
which is how I discovered IndicatorFill(). When it wasn't working, I did a 
Google search for IndicatorFill and that's how I discovered it was being 
used in the Python lexer. The documentation isn't very clear what an 
indicator value is but near as I can tell, it's just some user-defined 
value so you can put whatever you want. I could've just used a value of 0 
but I figured maybe I do want to see which value it is 
using SCI_INDICATORVALUEAT.

On Tuesday, March 26, 2024 at 5:05:17 PM UTC-5 [email protected] 
wrote:

> I think you committed the cardinal sin of programming.
>
> *You stole code you didn't write!*
>
> [image: indicatorfill-001.png]
>
> [image: indicatorfill-002.png]
>
> The closest thing to documentation I could find for "value" is this
>
> [image: indicatorfill-003.png]
>
> While it may be incorrect, if you dumpster dive through the Python lexer 
> held up as an example you will find then never provide a value other than 0 
> or 1 for "value"
>
> [image: indicatorfill-005.png]
>
> Soooo, I would first try that.
>
> You do also need to clear an indicator when you are done with it so it 
> doesn't hang around like that relative you can't get to leave after the 
> holidays. I don't know how you do that inside of a lexer, but at the edit 
> widget level, you use indicatorClearRange()
>
> On Tuesday, March 26, 2024 at 9:14:30 PM UTC [email protected] wrote:
>
>>
>> I use IndicatorFill() in my lexer written in c++. It's part of the 
>> LexAccessor class. You can find an example usage in LexPython.cxx.
>> On Tuesday, March 26, 2024 at 3:44:20 PM UTC-5 
>> [email protected] wrote:
>>
>>> On Tuesday, March 26, 2024 at 7:51:41 PM UTC [email protected] wrote:
>>>
>>> Well it was my first thought too when I was first having problems. I 
>>> also tried resetting the indicator with:
>>>
>>> styler.IndicatorFill(i, i+1, indicator, indicator);
>>> styler.IndicatorFill(i+1, i+1, 0, 0);
>>>
>>> but that didn't help.
>>>
>>>
>>> Please allow me to ask some more stupid questions.
>>>
>>> Are you ignoring compilation errors/warnings?
>>>
>>> [image: indicatorfill-search.png] 
>>> What language are you using?
>>>
>>> I see IndicatorFillRange() but I don't see any IndicatorFill(). Not even 
>>> at the official doc page.
>>> https://www.scintilla.org/ScintillaDoc.html
>>>
>>> The prototypes have a start position *and a length*. Nothing else. i+1 
>>> is providing value that is the current position in the document plus one 
>>> for a length which is going to change an awful lot if you are thousands of 
>>> lines in.
>>>
>>>

-- 
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 on the web visit https://groups.google.com/d/msgid/scintilla-interest/5bb4deea-9084-49af-8a01-7da67edf85c7n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.