Failed for this kind of snippet (from luaconf.h, Lua 5.2 beta):
LUA_LDIR"?.lua;"
The raw string tests in SCE_C_IDENTIFIER work, but once it switches back to SCE_C_DEFAULT, the SCE_C_DEFAULT to SCE_C_STRINGRAW transition seems to be too permissive. Recent hg build.
Possibly a check that the 'R' is in SCE_C_STRINGRAW state.
Changing the line to:
if (sc.chPrev == 'R' && styler.StyleAt(sc.currentPos - 1) == SCE_C_STRINGRAW) {
Works, but one glitch when editing: add a space or char between R and the "(string)", then delete the char. Then "(string)" stays a regular string. Possibly need something like the HEREDOC refresh you did for the Perl lexer...
Because the style of the previous byte is still in a buffer, it isn't seen by StyleAt. Adding in a Flush fixes this:
if (sc.chPrev == 'R') {
styler.Flush();
if (MaskActive(styler.StyleAt(sc.currentPos - 1)) == SCE_C_STRINGRAW) {
It may be better to either improve StyleAt so it looks into the buffered styles or add another method.
Good catch, editing work fine now.
Committed fix.