osyo-manga / vital-over

18 stars 3 forks source link

Error with s:base.hl_cursor_on: "E416: missing equal sign: links to Foo" #23

Open blueyed opened 10 years ago

blueyed commented 10 years ago

I am seeing the following error, when the cursor highlight gets restored:

line 1: call self.hl_cursor_on()
line 1: if exists("self.variables.old_hi_cursor")
>echo self.variables.old_hi_cursor
ctermfg=8 ctermbg=12 guifg=bg guibg=fg links to VisualNOS
line 2: execute "highlight Cursor " . self.variables.old_hi_cursor
line 2: highlight Cursor ctermfg=8 ctermbg=12 guifg=bg guibg=fg links to VisualNOS
>s
Exception thrown: Vim(highlight):E416: missing equal sign: links to VisualNOS
function EasyMotion#S..<SNR>236_findMotion..EasyMotion#command_line#GetInput..462..465..46
6..459
line 2: End of function
Error detected while processing function EasyMotion#S..<SNR>252_findMotion..EasyMotion#command_line#
GetInput..462..465..466..459:
line    2:
E416: missing equal sign: links to VisualNOS

Code: https://github.com/osyo-manga/vital-over/blob/master/autoload/vital/__latest__/Over/Commandline.vim#L247

This popped up via easymotion, which uses this library, and copied some code. More information and a suggested solution in the issue over there: https://github.com/Lokaltog/vim-easymotion/issues/95

osyo-manga commented 10 years ago

Thanks, I Fixed 46d6429251492f15623f2433cf8fbbff90bc0a23 in vital-over.

@haya14busa Please check and update vital-over.

haya14busa commented 10 years ago

Thanks for the prompt fix.

It looks good to me except OverCommandLineDefaultCursorInsert dosen't work correctly in my environment(Ubuntu cui). Now that I think about it, OverCommandLineDefaultCursorInsert probably didn't work before the commit and the cursor was displayed same as OverCommandLineDefaultCursor.

If I added cterm=underline, it will work correctly.

highlight OverCommandLineDefaultCursorInsert cterm=underline gui=underline
osyo-manga commented 10 years ago

@haya14busa Thanks! I added cterm=underline 0fa1873192a057ab8c6b87c739856b2443ecc70f.