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
commit850cfb235e8e92c5b180c94f81d599f88e8cef01 (patch)
treeed8b4168babc9123bd8ed5514c76fb38848ec225
parent06a3fcba8e3282aa52f90cbf6f2d1aad947a600c (diff)
downloadscintilla-mirror-850cfb235e8e92c5b180c94f81d599f88e8cef01.tar.gz
Bug [#1947]. Fix recognizing '"' after "," inside a bracketed substitution.
-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 241491425..419dcb5c6 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -580,6 +580,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://www.scintilla.org/scite413.zip">Release 4.1.3</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})