Hi,

There is a small bug in the Python Lexer, it doesnt properly (to the
best of my knowledge) identify comments on decorators, and marks the
whole line as a decorator.  The attached patch fixes that.

Stevo
diff -Naur orig/scintilla/src/LexPython.cxx edit/scintilla/src/LexPython.cxx
--- orig/scintilla/src/LexPython.cxx    2006-01-12 14:57:10.000000000 +1100
+++ edit/scintilla/src/LexPython.cxx    2006-01-23 12:26:09.000000000 +1100
@@ -213,6 +213,9 @@
                        if (sc.ch == '\r' || sc.ch == '\n') {
                                sc.SetState(SCE_P_DEFAULT);
                        }
+                       else if (sc.ch == '#') {
+                               sc.SetState(sc.chNext == '#' ? 
SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE);
+                       }
                } else if ((sc.state == SCE_P_STRING) || (sc.state == 
SCE_P_CHARACTER)) {
                        if (sc.ch == '\\') {
                                if ((sc.chNext == '\r') && (sc.GetRelative(2) 
== '\n')) {
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to