vim8.0 bug: syntax highlight breaks for "big" text file

85 views
Skip to first unread message

ping song

unread,
Oct 18, 2017, 11:43:49 AM10/18/17
to vim-use Mailingliste
I recently updated my cygwin and I found my vim (8.0 1-1052) does not work well on asciidoc syntax highlight.

* the issue is weird:

1. I start my file: vim temp.adoc, I see file opened with correct syntax highlight
2. C-G to go to the last line, syntax highlight is gone
3. gg to return to first line, syntax highlight is still gone.

* but this works:

1. open file
2. page down, OK
3. repeat 2 till the end of file, OK
4. go to first line, OK
5. go to last line, OK

* also, it looks file size matters
1. if the file is small, like 2 or 3 screen down the end, I don't see the issue.
2. the issue can be replicated with the attached file.

* I tested with markdown file and found the exactly same issue.

* I had another cygwin environment in same laptop, with a diff vim version (7.4 1-752). that one works fine. 
* I compared the asciidoc.vim syntax file between the two environment and confirmed they are the same one. 

I'm thinking this must be a bug in vim8, unless I'm missing anything here...


//to narrow down the issue I tried this:

pings@PINGS-X240:~$ vim -V2 -u NONE test.adoc

:nocp
:syntax enable

sourcing "/usr/share/vim/vim80/syntax/syntax.vim"
Searching for "syntax/synload.vim" in "/home/pings/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/home/pings/.vim/after"
line 19: sourcing "/usr/share/vim/vim80/syntax/synload.vim"
Searching for "syntax/syncolor.vim" in "/home/pings/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/home/pings/.vim/after"
line 21: sourcing "/usr/share/vim/vim80/syntax/syncolor.vim"
finished sourcing /usr/share/vim/vim80/syntax/syncolor.vim
continuing in /usr/share/vim/vim80/syntax/synload.vim
finished sourcing /usr/share/vim/vim80/syntax/synload.vim
continuing in /usr/share/vim/vim80/syntax/syntax.vim
Searching for "filetype.vim" in "/home/pings/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/home/pings/.vim/after"
line 25: sourcing "/usr/share/vim/vim80/filetype.vim"
Searching for "ftdetect/*.vim" in "/home/pings/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/home/pings/.vim/after"
not found in 'runtimepath': "ftdetect/*.vim"
finished sourcing /usr/share/vim/vim80/filetype.vim
continuing in /usr/share/vim/vim80/syntax/syntax.vim
Searching for "syntax/asciidoc.vim syntax/asciidoc/*.vim" in "/home/pings/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/home/pings/.vim/after"
line 24: sourcing "/usr/share/vim/vim80/syntax/asciidoc.vim"
finished sourcing /usr/share/vim/vim80/syntax/asciidoc.vim
continuing in function <SNR>2_SynSet
finished sourcing /usr/share/vim/vim80/syntax/syntax.vim
Press ENTER or type command to continue

now I press C-G to jump to the end, I see the issue, nothing reported. 

//this is version info
:vim8.0 version (cygwin64), where this issue is seen

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep  3 2017 22:16:18)
Included patches: 1-1052
Modified by <cyg...@cygwin.com>
Compiled by <cyg...@cygwin.com>
Huge version without GUI.  Features included (+) or not (-):
+acl             +clipboard       +dialog_con      +file_in_path    +job             +lua/dyn         +mouse_sgr       +path_extra      +rightleft       +tag_old_static  -toolbar         +windows
+arabic          +cmdline_compl   +diff            +find_in_path    +jumplist        +menu            -mouse_sysmouse  +perl/dyn        +ruby/dyn        -tag_any_white   +user_commands   +writebackup
+autocmd         +cmdline_hist    +digraphs        +float           +keymap          +mksession       +mouse_urxvt     +persistent_undo +scrollbind      -tcl             +vertsplit       -X11
-balloon_eval    +cmdline_info    -dnd             +folding         +lambda          +modify_fname    +mouse_xterm     +postscript      +signs           +termguicolors   +virtualedit     -xfontset
-browse          +comments        -ebcdic          -footer          +langmap         +mouse           +multi_byte      +printer         +smartindent     +terminal        +visual          -xim
++builtin_terms  +conceal         +emacs_tags      +fork()          +libcall         -mouseshape      +multi_lang      +profile         +startuptime     +terminfo        +visualextra     -xpm
+byte_offset     +cryptv          +eval            +gettext         +linebreak       +mouse_dec       -mzscheme        +python/dyn      +statusline      +termresponse    +viminfo         -xsmp
+channel         +cscope          +ex_extra        -hangul_input    +lispindent      -mouse_gpm       +netbeans_intg   +python3/dyn     -sun_workshop    +textobjects     +vreplace        -xterm_clipboard
+cindent         +cursorbind      +extra_search    +iconv           +listcmds        -mouse_jsbterm   +num64           +quickfix        +syntax          +timers          +wildignore      -xterm_save
-clientserver    +cursorshape     +farsi           +insert_expand   +localmap        +mouse_netterm   +packages        +reltime         +tag_binary      +title           +wildmenu
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/vim/vim-8.0.1052-1.x86_64/build=/usr/src/debug/vim-8.0.1052-1 -fdebug-prefix-map=/usr/src/ports/vim/vim-8.0.1052-1.x86_64/src/vim-8.0.1052=/usr/src/debug/vim-8.0.1052-1 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -fstack-protector  -fstack-protector-strong -L/usr/local/lib -Wl,--as-needed -o vim.exe        -lm -lelf    -lncursesw -liconv -lacl -lattr -lintl   -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong  -L/usr/lib/perl5/5.22/x86_64-cygwin-threads/CORE -lperl -lpthread -ldl -lcrypt
Press ENTER or type command to continue




:vim7.4 version(cygwin32) , work good
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 23 2015 20:55:54)
Included patches: 1-752
Compiled by <cyg...@cygwin.com>
Huge version without GUI.  Features included (+) or not (-):
+acl             -clientserver    +cscope          +emacs_tags      +folding         +keymap          +menu            +mouse_netterm   +netbeans_intg   +python3/dyn     -sniff           -tcl             +virtualedit     +writebackup
+arabic          +clipboard       +cursorbind      +eval            -footer          +langmap         +mksession       +mouse_sgr       +path_extra      +quickfix        +startuptime     +terminfo        +visual          -X11
+autocmd         +cmdline_compl   +cursorshape     +ex_extra        +fork()          +libcall         +modify_fname    -mouse_sysmouse  +perl/dyn        +reltime         +statusline      +termresponse    +visualextra     -xfontset
-balloon_eval    +cmdline_hist    +dialog_con      +extra_search    +gettext         +linebreak       +mouse           +mouse_urxvt     +persistent_undo +rightleft       -sun_workshop    +textobjects     +viminfo         -xim
-browse          +cmdline_info    +diff            +farsi           -hangul_input    +lispindent      -mouseshape      +mouse_xterm     +postscript      +ruby/dyn        +syntax          +title           +vreplace        -xsmp
++builtin_terms  +comments        +digraphs        +file_in_path    +iconv           +listcmds        +mouse_dec       +multi_byte      +printer         +scrollbind      +tag_binary      -toolbar         +wildignore      -xterm_clipboard
+byte_offset     +conceal         -dnd             +find_in_path    +insert_expand   +localmap        -mouse_gpm       +multi_lang      +profile         +signs           +tag_old_static  +user_commands   +wildmenu        -xterm_save
+cindent         +cryptv          -ebcdic          +float           +jumplist        +lua/dyn         -mouse_jsbterm   -mzscheme        +python/dyn      +smartindent     -tag_any_white   +vertsplit       +windows         -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: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/vim/vim-7.4.752-1.i686/build=/usr/src/debug/vim-7.4.752-1 -fdebug-prefix-map=/usr/src/ports/vim/vim-7.4
.752-1.i686/src/vim74=/usr/src/debug/vim-7.4.752-1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -fstack-protector  -L/usr/local/lib -Wl,--as-needed -o vim.exe        -lm -lelf    -lncursesw -liconv -lintl   -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector -L/usr/loc
al/lib  -L/usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE -lperl -ldl -lcrypt
Press ENTER or type command to continue


please help.


regards
ping


test.adoc

Uri Okrent

unread,
Feb 22, 2018, 11:56:24 AM2/22/18
to vim_use
I'm having the same issue with large python files with the exact same workaround:

> 1. open file
> 2. page down, OK
> 3. repeat 2 till the end of file, OK
> 4. go to first line, OK
> 5. go to last line, OK

I'm using vim 8 installed via homebrew on a mac.

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 13 2018 12:01:25)
macOS version
Included patches: 1-1500
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +channel +cryptv +emacs_tags -footer +lambda +mksession -mouse_sysmouse +path_extra +reltime +syntax +textobjects +viminfo -xpm
+arabic +cindent +cscope +eval +fork() +langmap +modify_fname +mouse_urxvt +perl +rightleft +tag_binary +timers +vreplace -xsmp
+autocmd -clientserver +cursorbind +ex_extra -gettext +libcall +mouse +mouse_xterm +persistent_undo +ruby +tag_old_static +title +wildignore -xterm_clipboard
-autoservername +clipboard +cursorshape +extra_search -hangul_input +linebreak -mouseshape +multi_byte +postscript +scrollbind -tag_any_white -toolbar +wildmenu -xterm_save
-balloon_eval +cmdline_compl +dialog_con +farsi +iconv +lispindent +mouse_dec +multi_lang +printer +signs -tcl +user_commands +windows
+balloon_eval_term +cmdline_hist +diff +file_in_path +insert_expand +listcmds -mouse_gpm -mzscheme +profile +smartindent +termguicolors +vertsplit +writebackup
-browse +cmdline_info +digraphs +find_in_path +job +localmap -mouse_jsbterm +netbeans_intg +python +startuptime +terminal +virtualedit -X11
++builtin_terms +comments -dnd +float +jumplist -lua +mouse_netterm +num64 -python3 +statusline +terminfo +visual -xfontset
+byte_offset +conceal -ebcdic +folding +keymap +menu +mouse_sgr +packages +quickfix -sun_workshop +termresponse +visualextra -xim
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -framework AppKit -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib
-L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/opt/python/Frameworks -framework Python -lruby.2.5.0 -lobjc

I don't experience this issue using vim 7.4 installed side-by-side (vim@7.4) on the same machine, using the same .vimrc.

Have you discovered any workaround for this issue?
Reply all
Reply to author
Forward
0 new messages