about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Util/ztst-syntax.vim10
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 592f4f0bc..1e2cc7028 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-01-07  Daniel Shahaf  <danielsh@apache.org>
 
+	* unposted: Util/ztst-syntax.vim: internal: ztst.vim: Use
+	:syn-sync to work around (#x) and "`\\\\\\\\`" confusing the
+	highlighting.
+
 	* unposted: Util/zyodl.vim: internal: zyodl.vim: Support glob
 	qualifiers in example()'s
 
diff --git a/Util/ztst-syntax.vim b/Util/ztst-syntax.vim
index f0c82d74c..01e4dae31 100644
--- a/Util/ztst-syntax.vim
+++ b/Util/ztst-syntax.vim
@@ -58,6 +58,16 @@ syn match  ztstComment             /^#.*/
 " harness to the test files.
 syn keyword ztstSpecialVariable ZTST_unimplemented ZTST_skip ZTST_testdir ZTST_fd ZTST_srcdir containedin=@zsh 
 
+"" Sync
+" The following is sufficient for our modest line-based format, and helps
+" sidestep problems resulting from test cases that use syntax constructs
+" that confuse us and/or syntax/zsh.vim.  If we outgrow it, we should sync
+" on empty lines instead.
+"
+" If you run into syntax highlighting issues, just scroll the line that throws
+" the syntax highlighting off off the top of the screen.
+syn sync maxlines=1
+
 "" Highlight groups:
 hi def link ztstExitCode                  Number
 hi def link ztstFlags                     Normal