Hi,

The following syntax rules behave differently when included into other syntax:

syn keyword barKey X contained
syn keyword barKey Y

Attached archive that makes it easy to reproduce. More details you can
find below.

syntax/bar.vim file:
...
syn cluster barTop contains=TOP
syn keyword barKey X contained
syn keyword barKey Y
...

syntax/foo.vim file:
...
syn include @barTop syntax/bar.vim
unlet b:current_syntax
syn region fooBar matchgroup=Delimiter start="^" end="$" contains=@barTop
...

test file:
 X
 Y

I'm using hilinks plugin for debug, that is also included in the archive.

If open test file and set file type to bar then "X" is not identified
as barKey and it's correct. However, if you set file type to foo then
"X" matches fooBar->barKey.

I hope above would help to reproduce and fix the issue.

System information:
uname -a
Darwin new-mac.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7
16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386
MacBook7,1 Darwin


VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 22 2012 18:20:25)
Included patches: 1-444
Modified by Gentoo-7.3.444
Compiled by [email protected]
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
+cindent -clientserver
-clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv -cscope
+cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra
+extra_search +farsi +file_in_path +find_in_path +float +folding
-footer +fork() +gettext
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap
+libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse
-mouseshape +mouse_dec
-mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm
+mouse_urxvt +multi_byte
+multi_lang -mzscheme +netbeans_intg +path_extra +perl
+persistent_undo +postscript +printer
+profile +python -python3 +quickfix +reltime +rightleft -ruby
+scrollbind +signs +smartindent
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands
+vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows
+writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
  system vimrc file: "/opt/portage/etc/vim/vimrc"
    user vimrc file: "$HOME/.vimrc"
     user exrc file: "$HOME/.exrc"
 fall-back for $VIM: "/opt/portage/usr/share/vim"
Compilation: x86_64-apple-darwin10-gcc -c -I. -Iproto -DHAVE_CONFIG_H
  -march=nocona -march=nocona -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: x86_64-apple-darwin10-gcc   -Wl,-dead_strip_dylibs -o vim
 -lcurses -liconv -lintl    -Wl,-dead_strip_dylibs
-L/opt/portage/usr/lib/perl5/5.12.3/x86_64-darwin/CORE -lperl -lm
-lutil -lc -L/opt/portage/usr/lib/python2.7/config -lpython2.7


--
Best regards, Ruslan.

-- 
You received this message from the "vim_dev" 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

Attachment: example.tar.gz
Description: GNU Zip compressed data

Raspunde prin e-mail lui