aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-01-29 22:24:56 +1100
committerNeil <nyamatongwe@gmail.com>2019-01-29 22:24:56 +1100
commitb54e26a3dc5cdfbd6d49a1dd0b0c29dbab386044 (patch)
tree5d362e63a3236e556314b3de5327e27565dabc89
parent867d324b771ee749a7ad31faf19baab7b1ccaa38 (diff)
downloadscintilla-mirror-b54e26a3dc5cdfbd6d49a1dd0b0c29dbab386044.tar.gz
Backport: Bug [#1947]. Fix recognizing '"' after "," inside a bracketed substitution.
Backport of changeset 7243:f75e25db799e.
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--lexers/LexTCL.cxx4
-rw-r--r--test/examples/x.tcl5
-rw-r--r--test/examples/x.tcl.styled5
4 files changed, 17 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 72b7e4467..a697700a8 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -570,6 +570,10 @@
Fix fold behaviour with comments in nim.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1254/">Feature #1254</a>.
</li>
+ <li>
+ Fix TCL lexer recognizing '"' after "," inside a bracketed substitution.
+ <a href="https://sourceforge.net/p/scintilla/bugs/1947/">Bug #1947</a>.
+ </li>
</ul>
<h3>
<a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.10.2/scintilla3102.zip/download">Release 3.10.2</a>
diff --git a/lexers/LexTCL.cxx b/lexers/LexTCL.cxx
index 0948f4880..1ea6ecf6e 100644
--- a/lexers/LexTCL.cxx
+++ b/lexers/LexTCL.cxx
@@ -128,8 +128,10 @@ next:
continue;
case ',':
sc.SetState(SCE_TCL_OPERATOR);
- if (subParen)
+ if (subParen) {
sc.ForwardSetState(SCE_TCL_SUBSTITUTION);
+ goto next; // Already forwarded so avoid loop's Forward()
+ }
continue;
default :
// maybe spaces should be allowed ???
diff --git a/test/examples/x.tcl b/test/examples/x.tcl
index 7553aca2d..6a4b13dbe 100644
--- a/test/examples/x.tcl
+++ b/test/examples/x.tcl
@@ -6,3 +6,8 @@ proc Echo_Server {port} {
set s [socket -server EchoAccept $port]
vwait forever
}
+
+# Bug #1947
+
+$s($i,"n")
+set n $showArray($i,"neighbor")
diff --git a/test/examples/x.tcl.styled b/test/examples/x.tcl.styled
index b9d419b41..fecdc9dea 100644
--- a/test/examples/x.tcl.styled
+++ b/test/examples/x.tcl.styled
@@ -6,3 +6,8 @@
{0} {12}set{0} {7}s{0} {6}[{12}socket{0} {10}-server{0} {7}EchoAccept{0} {8}$port{6}]
{0} {12}vwait{0} {7}forever{0}
{6}}
+{0}
+{2}# Bug #1947
+{0}
+{8}$s{6}({8}$i{6},{5}"n"{6})
+{12}set{0} {7}n{0} {8}$showArray{6}({8}$i{6},{5}"neighbor"{6})