summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2019-12-27 07:21:42 +0000
committerDaniel Shahaf <danielsh@apache.org>2020-01-07 19:37:41 +0000
commit39d0d4323d77b1f89bb3feaa18339888567084c0 (patch)
tree71976c46de0ad45fad22e458d9b9e2fbe8ec4b0c
parentb066ce22d051ba99e7d9fdb296ba522d62e88607 (diff)
downloadzsh-39d0d4323d77b1f89bb3feaa18339888567084c0.tar.gz
zsh-39d0d4323d77b1f89bb3feaa18339888567084c0.tar.xz
zsh-39d0d4323d77b1f89bb3feaa18339888567084c0.zip
unposted: internal: ztst.vim: Use :syn-sync to work around (#x) and "`\\\\\\\\`" confusing the highlighting.
-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