Saturday, May 30, 2015

[bug] CSApprox plugin gives error building Vim-7.4.729 without GUI support

Hi

I'm using the latest CSApprox plugin 4.0 from Matt Wozniski (in CC)
available at http://www.vim.org/scripts/script.php?script_id=2390

The plugin works fine when I have ":colorscheme ..." in my ~/.vimrc.
However, I noticed a problem which happens with vim-7.4.729 or
older If I don't put the ":colorscheme ..." command in my ~/.vimrc,
or if I just use an empty ~/.vimrc, I then get these errors when
starting vim:

===
Error detected while processing function
<SNR>2_CSApprox..<SNR>2_CSApproxImpl..<SNR>2_FixupGuiInfo:
line 1:
E716: Key not present in Dictionary: 0
E15: Invalid expression: a:highlights[s:hlid_normal].gui.bg == ''
Error detected while processing /home/pel/.vim/after/plugin/CSApprox.vim:
line 28:
E171: Missing :endif
Press ENTER or type command to continue
===

If do "vim foo.txt" then not only do I get the above error, but the
file foo.txt is also not loaded.

Investigating, I found that I get these errors if I build vim without
GUI support i.e.:

./configure --with-features=huge --enable-gui=none

I don't get the errors if I build with the GUI, i.e.:

./configure --with-features=huge --enable-gui=gtk2

In the help file CSApprox.txt, I read:

===
2. Requirements *csapprox-requirements*

For CSApprox to work, there are 2 major requirements that must be met.

a) GUI support (or vim >= 7.3) *csapprox-gui-support* *csapprox-+gui*

NOTE This section only applies to vim versions before 7.3.000 - a modern vim
does not need GUI support in order for CSApprox to function.
===

Since I use Vim-7.4.729, I would thus expect CSApprox to
work fine without GUI support, but somehow there is a bug.

Regards
Dominique

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: