I fixed the bits I mentioned and did rudimentary testing that shows it works well. The lexer is indeed a plain copy of Scintilla's one, so no problem here. IMO this is fine to go in, and I'll make a PR for review.
@Snowflake what credit should I use? Your name and email as see on this ML, or something else?
Cheers, Colomban
Thank you very much! I had freed some time this Sunday to look over those issues you mentioned, but you beat me to it. Again, thanks!
Personally, I don't care much about credit, so I'd be fine without it. If it's strictly necessary, then this name and address are fine.