Posted 20 years ago
by Campion
I'm trying out the new CustomHighlightingStyle feature added in v2.0.0105 and believe I found a couple of bugs.
First off, I'm following the general steps listed in the "Semantic Parsing - Assigning a Custom HighlightingStyle to a Specific Token" section of the documentation. The only real difference is I'm not using an IdentifierToken but a FunctionToken that I added to the language definition file.
1. The custom style (color in this case) does not take affect until the document is edited. i.e. the color of the functions is the default style's color when the text is first programmatically added.
2. Once the custom style (color in this case) takes affect, it doesn't switch to another style, in certain cases. For example, as I'm typing "functionName()", once I type "(" the text correctly changes to the custom color. However, it does not switch colors once I backspace from after ")" to the "m" ("functionNam"). A comparison would be to typing "double" and having it colored blue after the "e" and back to black when backspacing to "l" ("doubl").
First off, I'm following the general steps listed in the "Semantic Parsing - Assigning a Custom HighlightingStyle to a Specific Token" section of the documentation. The only real difference is I'm not using an IdentifierToken but a FunctionToken that I added to the language definition file.
1. The custom style (color in this case) does not take affect until the document is edited. i.e. the color of the functions is the default style's color when the text is first programmatically added.
2. Once the custom style (color in this case) takes affect, it doesn't switch to another style, in certain cases. For example, as I'm typing "functionName()", once I type "(" the text correctly changes to the custom color. However, it does not switch colors once I backspace from after ")" to the "m" ("functionNam"). A comparison would be to typing "double" and having it colored blue after the "e" and back to black when backspacing to "l" ("doubl").