summaryrefslogtreecommitdiffstats
path: root/scintilla/src
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/src')
-rw-r--r--scintilla/src/Editor.cxx17
-rw-r--r--scintilla/src/LexCPP.cxx2
-rw-r--r--scintilla/src/LexSQL.cxx2
3 files changed, 20 insertions, 1 deletions
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx
index 36a0099..f25534b 100644
--- a/scintilla/src/Editor.cxx
+++ b/scintilla/src/Editor.cxx
@@ -5254,7 +5254,22 @@ int Editor::KeyCommand(unsigned int iMessage) {
return 0;
}
-int Editor::KeyDefault(int, int) {
+int Editor::KeyDefault(int key, int modifiers) {
+ // SCN_KEY is normally not sent for key codes >= 256 or on Windows; but this
+ // notification is needed for the code folding keyboard commands, and this
+ // is by far the best way to do this (making an accelerator for every
+ // possible hotkey combo--remember the Ctrl modifier for child nodes--is
+ // unwieldy, and manually handling the Windows messages would mean that we
+ // have to duplicate all the processing work that Scintilla does
+ if (modifiers & SCI_ALT && key >= SCK_DOWN && key <= SCK_RIGHT)
+ {
+ SCNotification scn = {0};
+ scn.nmhdr.code = SCN_KEY;
+ scn.ch = key;
+ scn.modifiers = modifiers;
+ NotifyParent(scn);
+ }
+
return 0;
}
diff --git a/scintilla/src/LexCPP.cxx b/scintilla/src/LexCPP.cxx
index 94995bc..dfa0754 100644
--- a/scintilla/src/LexCPP.cxx
+++ b/scintilla/src/LexCPP.cxx
@@ -421,6 +421,7 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle,
levelNext--;
}
}
+ /* Disable explicit folding; it can often cause problems with non-aware code
if (foldComment && (style == SCE_C_COMMENTLINE)) {
if ((ch == '/') && (chNext == '/')) {
char chNext2 = styler.SafeGetCharAt(i + 2);
@@ -431,6 +432,7 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle,
}
}
}
+ */
if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {
if (ch == '#') {
unsigned int j = i + 1;
diff --git a/scintilla/src/LexSQL.cxx b/scintilla/src/LexSQL.cxx
index c739e4f..9414537 100644
--- a/scintilla/src/LexSQL.cxx
+++ b/scintilla/src/LexSQL.cxx
@@ -262,6 +262,7 @@ static void FoldSQLDoc(unsigned int startPos, int length, int initStyle,
levelNext--;
}
}
+ /* Disable explicit folding; it can often cause problems with non-aware code
if (foldComment && (style == SCE_SQL_COMMENTLINE)) {
// MySQL needs -- comments to be followed by space or control char
if ((ch == '-') && (chNext == '-')) {
@@ -274,6 +275,7 @@ static void FoldSQLDoc(unsigned int startPos, int length, int initStyle,
}
}
}
+ */
if (style == SCE_SQL_OPERATOR) {
if (ch == '(') {
levelNext++;