vim-perl / vim-perl6

Vim runtime files for Perl 6 support. This has moved to the Raku organization.
https://github.com/Raku/vim-raku
17 stars 22 forks source link

Hyper on method call causes incorrect highlighting #2

Open 0racle opened 8 years ago

0racle commented 8 years ago

Description of issue

When using the hyper » op to perform a method call, all subsequent method calls (which are normally un-highlighted/white) are highlighted incorrectly until a character appears that has a specific color.

Screenshot of the issue:

Screenshot

Above screenshot taken using the 256-color jellybeans color scheme.

Sample code:

# Blue methods after hyper method call
@arr.words».tc.join.split().comb».join.split[0];

# No issues seen on normal method call
@arr.words.join.split.join.comb.subst(1, 1).tclc;

Link to vimrc

vimrc

Output of vim --version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 21 2015 12:30:04)
Included patches: 1-712
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-i386-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions 
hoelzro commented 8 years ago

@0racle Thanks for the report! I can see what you're saying; can you provide an example (both screenshot and code) of a chained method call that doesn't use » and thus highlights correctly?

0racle commented 8 years ago

I've updated the screenshot in the issue.

hoelzro commented 8 years ago

Here's what I'm seeing when I run vim -u NONE -c 'source syntax/perl6.vim' -c 'syntax on' -c 'setf perl6' example.pl:

vim-perl-chained-methods