Created
May 21, 2009 17:34
-
-
Save emk/115584 to your computer and use it in GitHub Desktop.
wxScintilla LexLisp: More brackets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/stc/scintilla/src/LexLisp.cxx b/src/stc/scintilla/src/LexLisp.cxx | |
index 8784e38..e1d06cb 100644 | |
--- a/src/stc/scintilla/src/LexLisp.cxx | |
+++ b/src/stc/scintilla/src/LexLisp.cxx | |
@@ -32,7 +32,7 @@ using namespace Scintilla; | |
static inline bool isLispoperator(char ch) { | |
if (isascii(ch) && isalnum(ch)) | |
return false; | |
- if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' ) | |
+ if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}') | |
return true; | |
return false; | |
} | |
@@ -246,9 +246,9 @@ static void FoldLispDoc(unsigned int startPos, int length, int /* initStyle */, | |
styleNext = styler.StyleAt(i + 1); | |
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); | |
if (style == SCE_LISP_OPERATOR) { | |
- if (ch == '(') { | |
+ if (ch == '(' || ch == '[' || ch == '{') { | |
levelCurrent++; | |
- } else if (ch == ')') { | |
+ } else if (ch == ')' || ch == ']' || ch == '}') { | |
levelCurrent--; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment