rickhowe / diffchar.vim

Highlight the exact differences, based on characters and words
http://www.vim.org/scripts/script.php?script_id=4932
MIT License
217 stars 10 forks source link

Errors after update to 7.01 #11

Closed sblask closed 7 years ago

sblask commented 7 years ago

Not sure which version I was on before, but after an update to 7.01 I get a wall of failures when using vimdiff. Am I doing something wrong?

Messages maintainer: Mike Williams <mrw@eandem.co.uk>
"/tmp/Bt4vKp_functions.zsh" [readonly] 53L, 1040C
"zshrc.d.dotfile/functions.zsh" [readonly] 49L, 991C
Error detected while processing /home/sebastian/.vim/bundle/diffchar.vim/autoload/diffchar.vim:
line   34:
E113: Unknown option: termguicolors
E15: Invalid expression: {'QuitPre': exists('##QuitPre'),'TextChanged': exists('##TextChanged'),'TextChangedI': exists('##TextChangedI'),'MatchaddPos': exists('*matchaddpos'),'GUI': &term == 'builtin_gui' || &termguicolors,'Timers': has('timers'),'DiffHLUnhidden': has('pat
ch-7.4.682'),'WindowID': has('patch-7.4.1895'),'DiffOptionSet': has('patch-8.0.736'),'StrikeAttr': has('patch-8.0.1038') && (&term == 'builtin_gui' ||&term == 'nvim' || (!empty(&t_Ts) && !empty(&t_Te)))}
line  177:
E121: Undefined variable: s:VF
E116: Invalid arguments for function extend({'A': 'DiffAdd', 'C': 'DiffChange', 'T': 'DiffText','Z': '_DiffAddPos', 'U': s:VF.GUI ? 'Cursor' : 'VertSplit'},s:VF.StrikeAttr ? {'d': 'DiffDelete', 'D': '_DiffDelStk'} :{'D': 'DiffDelete'})
E15: Invalid expression: extend({'A': 'DiffAdd', 'C': 'DiffChange', 'T': 'DiffText','Z': '_DiffAddPos', 'U': s:VF.GUI ? 'Cursor' : 'VertSplit'},s:VF.StrikeAttr ? {'d': 'DiffDelete', 'D': '_DiffDelStk'} :{'D': 'DiffDelete'})
line 1297:
E121: Undefined variable: s:VF
E15: Invalid expression: s:VF.WindowID
line 1335:
E121: Undefined variable: s:VF
E15: Invalid expression: s:VF.MatchaddPos
line 1385:
E121: Undefined variable: s:VF
E15: Invalid expression: !s:VF.Timers || !s:VF.DiffOptionSet
line 1413:
E121: Undefined variable: s:VF
E15: Invalid expression: s:VF.DiffHLUnhidden
Error detected while processing function diffchar#SetDiffModeSync:
line   17:
E121: Undefined variable: s:VF
E15: Invalid expression: s:VF.Timers
rickhowe commented 7 years ago

Thank you for your question. Looks like your vim does not have a termguicolors feature. I will fix it in the next update but as a workaround please try to modify line 28 of /home/sebastian/.vim/bundle/diffchar.vim/autoload/diffchar.vim: from \'GUI': &term == 'builtin_gui' || &termguicolors, to \'GUI': &term == 'builtin_gui',

sblask commented 7 years ago

I am on Ubuntu 16.04, using xterm and tmux, this is what I have installed:

~ $ dpkg -l | grep vim
ii  vim-common                                  2:7.4.1689-3ubuntu1.2                           amd64        Vi IMproved - Common files
ii  vim-gtk-py2                                 2:7.4.1689-3ubuntu1.2                           amd64        Vi IMproved - enhanced vi editor - with GTK2 GUI (Python2)
ii  vim-gui-common                              2:7.4.1689-3ubuntu1.2                           all          Vi IMproved - Common GUI files
ii  vim-runtime                                 2:7.4.1689-3ubuntu1.2                           all          Vi IMproved - Runtime files
ii  vim-tiny                                    2:7.4.1689-3ubuntu1.2                           amd64        Vi IMproved - enhanced vi editor - compact version

Thanks for your workaround, it works. Let me know if you need more information.