Is this the way to submit updates for problems?

syntax/pod.vim shows how to include pod sections and says to
put the option "contained" in each region defined
in an "including" language.

syntax/perl.vim doesn't do this.
Result -- when I have pod in my perl.vim file, the pod can turn off
syntax highlighting for perl-code that follows.  I've put together
a patch that seems to address the problem (?)
Note, I do have "perl_include_pod" set to 1.



This patch adds the "contained" option at the at the end
of the 6 perlPOD regions defined:

--- syntax/perl.vim     2016-10-27 18:55:35.000000000 -0700
+++ syntax/perl.vim     2016-10-27 18:59:03.842586040 -0700
@@ -50,18 +50,18 @@
  syn include @Pod syntax/pod.vim
  unlet b:current_syntax
  if exists("perl_fold")
-    syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend fold extend
-    syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend 
fold extend
+    syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend fold extend contained
+    syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend 
fold extend contained
  else
-    syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend
-    syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend
+    syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend contained
+    syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend 
contained
  endif
else
  " Use only the bare minimum of rules
  if exists("perl_fold")
-    syn region perlPOD start="^=[\I]" end="^=cut" fold
+    syn region perlPOD start="^=[\I]" end="^=cut" fold contained
  else
-    syn region perlPOD start="^=[\I]" end="^=cut"
+    syn region perlPOD start="^=[\I]" end="^=cut" contained
  endif
endif



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to