Discussion:
Braces highlighting bug
mapiet
2014-05-27 06:04:53 UTC
Permalink
Hi,
This is my first post in the group :)
I have included SciLexer.dll in my project. I have noticed, that when I am using my program and there are the braces, and braces matching is on, then highlighted braces have different style than rest of code/text. I have to clarify, that for all styles I have changed earlier font name and size. Is that correct behavior of the lexer?
--
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 scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Nils Nordman
2014-05-27 08:31:20 UTC
Permalink
Hi,

It's not a property of the lexer as far as I know. Did you change the
STYLE_BRACELIGHT as well as the other styles?

http://www.scintilla.org/ScintillaDoc.html#Styling

Cheers,

Nils
Post by mapiet
Hi,
This is my first post in the group :)
I have included SciLexer.dll in my project. I have noticed, that when I am using my program and there are the braces, and braces matching is on, then highlighted braces have different style than rest of code/text. I have to clarify, that for all styles I have changed earlier font name and size. Is that correct behavior of the lexer?
--
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 scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
mapiet
2014-05-27 12:06:44 UTC
Permalink
Thank You Nils,
Your tips have resolved my issue. But now I have another problem: styling
of unmatched braces doesn't work. Earlier I didn't check it. At this moment
the unmatched braces don't have any highlighting at all. Do You know, why?
Post by Nils Nordman
Hi,
It's not a property of the lexer as far as I know. Did you change the
STYLE_BRACELIGHT as well as the other styles?
http://www.scintilla.org/ScintillaDoc.html#Styling
Cheers,
Nils
Post by mapiet
Hi,
This is my first post in the group :)
I have included SciLexer.dll in my project. I have noticed, that when I
am using my program and there are the braces, and braces matching is on,
then highlighted braces have different style than rest of code/text. I have
to clarify, that for all styles I have changed earlier font name and size.
Is that correct behavior of the lexer?
--
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 scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Nils Nordman
2014-05-27 14:02:28 UTC
Permalink
Hi,

did you set STYLE_BRACEBAD? And are you calling SCI_BRACEBADLIGHT correctly?

http://www.scintilla.org/ScintillaDoc.html#SCI_BRACEBADLIGHT

Nils
Post by mapiet
Thank You Nils,
styling of unmatched braces doesn't work. Earlier I didn't check it. At
this moment the unmatched braces don't have any highlighting at all. Do
You know, why?
Hi,
It's not a property of the lexer as far as I know. Did you change the
STYLE_BRACELIGHT as well as the other styles?
http://www.scintilla.org/ScintillaDoc.html#Styling
<http://www.scintilla.org/ScintillaDoc.html#Styling>
Cheers,
Nils
Post by mapiet
Hi,
This is my first post in the group :)
I have included SciLexer.dll in my project. I have noticed, that
when I am using my program and there are the braces, and braces
matching is on, then highlighted braces have different style than
rest of code/text. I have to clarify, that for all styles I have
changed earlier font name and size. Is that correct behavior of the
lexer?
--
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
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
--
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 scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
mapiet
2014-05-28 08:45:13 UTC
Permalink
Thank You Nils for your reply. In fact, I didn't use SCI_BRACEBADLIGHT
call. I didn't know, that it is necessary. Now all works fine.
(It is worth to notice, that the first thing to do is to get character from
position before cursor and check, whether this is the character from range
[()[]{}<>]. Am I right?)
Marcin
--------------------------------------------
Post by Nils Nordman
Hi,
did you set STYLE_BRACEBAD? And are you calling SCI_BRACEBADLIGHT correctly?
http://www.scintilla.org/ScintillaDoc.html#SCI_BRACEBADLIGHT
Nils
Post by mapiet
Thank You Nils,
styling of unmatched braces doesn't work. Earlier I didn't check it. At
this moment the unmatched braces don't have any highlighting at all. Do
You know, why?
Hi,
It's not a property of the lexer as far as I know. Did you change
the
Post by mapiet
STYLE_BRACELIGHT as well as the other styles?
http://www.scintilla.org/ScintillaDoc.html#Styling
<http://www.scintilla.org/ScintillaDoc.html#Styling>
Cheers,
Nils
Post by mapiet
Hi,
This is my first post in the group :)
I have included SciLexer.dll in my project. I have noticed, that
when I am using my program and there are the braces, and braces
matching is on, then highlighted braces have different style than
rest of code/text. I have to clarify, that for all styles I have
changed earlier font name and size. Is that correct behavior of the
lexer?
--
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 scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Nils Nordman
2014-05-28 10:01:28 UTC
Permalink
Post by mapiet
Thank You Nils for your reply. In fact, I didn't use SCI_BRACEBADLIGHT
call. I didn't know, that it is necessary. Now all works fine.
(It is worth to notice, that the first thing to do is to get character
from position before cursor and check, whether this is the character
from range [()[]{}<>]. Am I right?)
I use similar logic myself to check whether to highlight a bad brace,
when notified of a position change.

Cheers,

Nils
--
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 scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...