This project is read-only.

Word highlighted as soon as finished typing

Topics: Developer Forum, User Forum
Jul 31, 2008 at 11:22 PM
I was wondering if highlighting as soon as a word is finished typing is possible.  For example, using C# language, as soon as I typed "foreach", the editor will highlight the word.  Currently, you have to type "foreach " (a space after the word) to highlight the key word. 

If that can't be done, is it possible to highlight the word after leaving focus?  For example, if I typed "foreach", then switch to another control/application, can I force the editor to update the syntax highlighting (so the word foreach will be highlighted)? 

Thank you.
Jul 31, 2008 at 11:40 PM
Unfortunately this particular issue is out of the hands of this project. This behavior comes from the cpp lexer that comes with the native Scintilla control. It doesn't recognize keywords until there's a trailing whitespace character. It would be nice if EOF counted but it doesn't.

You can try posing this question to the Scintilla list http://groups.google.com/group/scintilla-interest/ but I've seen it before and nothing's ever happened with it.

As a workaround when the control looses focus you can look to see if the last word is a keyword and if so add a space.