From 489e17fa9fc62f39ae61e83fce7248de489d33de Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Tue, 25 Jun 2019 12:07:19 +1000 Subject: Backport: Bug [#2098]. Fix single quoted strings where '" (quote, double quote) was seen as continuing the string. Backport of changeset 7605:bd1bf8e13d33. --- doc/ScintillaHistory.html | 4 ++++ lexers/LexSQL.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 5965e12ec..fae258457 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -567,6 +567,10 @@ Bug #2112.
  • + SQL lexer fixes single quoted strings where '" (quote, double quote) was seen as continuing the string. + Bug #2098. +
  • +
  • Platform layers should use InsertCharacter method to perform keyboard and IME input, replacing AddCharUTF method. Feature #1293. diff --git a/lexers/LexSQL.cxx b/lexers/LexSQL.cxx index aeb7f4772..c56c8a4da 100644 --- a/lexers/LexSQL.cxx +++ b/lexers/LexSQL.cxx @@ -537,7 +537,7 @@ void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int i if (options.sqlBackslashEscapes && sc.ch == '\\') { sc.Forward(); } else if (sc.ch == '\'') { - if (sc.chNext == '\"') { + if (sc.chNext == '\'') { sc.Forward(); } else { sc.ForwardSetState(SCE_SQL_DEFAULT); -- cgit v1.2.3