godlygeek / csapprox

Make gvim-only colorschemes work transparently in terminal vim
http://www.vim.org/scripts/script.php?script_id=2390
211 stars 18 forks source link

Invalid expression: a:highlights[s:hlid_normal].gui.bg #9

Closed redneb closed 11 years ago

redneb commented 12 years ago

This is really a duplicate of issue #6, I did not have permission to reopen it so I created a new one.

After installing csapprox I get the following error when I start vim:

Error detected while processing function <SNR>16_CSApprox..<SNR>16_CSApproxImpl..<SNR>16_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/marios/.vim/bundle/csapprox/after/plugin/CSApprox.vim:
line    3:
E171: Missing :endif

Installing gvim (which is proposed as a solution in issue #6) is not an option as I don't want to install all the dependencies that come with it just to make csapprox work.

kurkale6ka commented 11 years ago

Right, I can confirm this is still happening for me if I don't use gvim -v. Supposedly csapprox would work with version 7.3.000 without gui support but it is not the case

mxgrn commented 11 years ago

+1

srcshelton commented 11 years ago

Same here with vim-nox_2:7.3.547-6ubuntu5_amd64.deb

godlygeek commented 11 years ago

Tracked this down - for some reason, vim.nox isn't creating the Normal highlight group by default, despite the fact that it's documented in a section that says "These are the default highlighting groups."

Sigh. Anyway, this patch should take care of the issue in a way that has no impact if the Normal group had already been defined. Please reopen if you're still having problems after this commit...