aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html1
-rw-r--r--lexers/LexSQL.cxx7
2 files changed, 7 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 9d0cc32d6..dad037e23 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -357,6 +357,7 @@
<td>Sam Rawlins</td>
</tr><tr>
<td>Michael Mullin</td>
+ <td>Carlos SS</td>
</tr>
</table>
<p>
diff --git a/lexers/LexSQL.cxx b/lexers/LexSQL.cxx
index 6ec32d04d..1375af5cb 100644
--- a/lexers/LexSQL.cxx
+++ b/lexers/LexSQL.cxx
@@ -70,6 +70,11 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, int initStyle, Wo
bool sqlBackslashEscapes = styler.GetPropertyInt("sql.backslash.escapes", 0) != 0;
bool sqlBackticksIdentifier = styler.GetPropertyInt("lexer.sql.backticks.identifier", 0) != 0;
+
+ // property lexer.sql.numbersign.comment
+ // If "lexer.sql.numbersign.comment" property is set to 0 a line beginning with '#' will not be a comment.
+ bool sqlNumbersignComment = styler.GetPropertyInt("lexer.sql.numbersign.comment", 1) != 0;
+
int styleBeforeDCKeyword = SCE_SQL_DEFAULT;
for (; sc.More(); sc.Forward()) {
// Determine if the current state should terminate.
@@ -206,7 +211,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, int initStyle, Wo
// Perhaps we should enforce that with proper property:
//~ } else if (sc.Match("-- ")) {
sc.SetState(SCE_SQL_COMMENTLINE);
- } else if (sc.ch == '#') {
+ } else if (sc.ch == '#' && sqlNumbersignComment) {
sc.SetState(SCE_SQL_COMMENTLINEDOC);
} else if (sc.ch == '\'') {
sc.SetState(SCE_SQL_CHARACTER);