From 39d0d4323d77b1f89bb3feaa18339888567084c0 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 27 Dec 2019 07:21:42 +0000 Subject: [PATCH] unposted: internal: ztst.vim: Use :syn-sync to work around (#x) and "`\\\\\\\\`" confusing the highlighting. --- ChangeLog | 4 ++++ Util/ztst-syntax.vim | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 592f4f0bc..1e2cc7028 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-01-07 Daniel Shahaf + * 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