vimade icon indicating copy to clipboard operation
vimade copied to clipboard

conflict with goyo [vimade#Redraw[6]]

Open YuCao16 opened this issue 4 years ago • 3 comments

Hi, Thanks for your work, it works unbelievable well. It seems not capable with Goyo, however, if I type :Goyo, it was fine, but when I quit Goyo by typing :Goyo!, it raise me this error:

Error detected while processing function vimade#Redraw[6]..provider#python3#Call:
line   18:
Error invoking 'python_execute' on channel 4 (python3-script-host):
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/bridge.py", line 14, in unfadeAll
    fader.unfadeAll()
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/fader.py", line 334, in unfadeAll
    unfadeAllSigns()
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/fader.py", line 320, in unfadeAllSigns
    signs.unfade_bufs(list(currentBuffers.values()))
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/signs.py", line 35, in unfade_bufs
    buf_signs = util.eval_and_return('[' + ','.join(['get(getbufinfo('+x.bufnr+')[0], \'signs\', [])' for x in bufs ]) + ']')
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynvim/plugin/script_host.py", line 205, in eval
    obj = self.request("vim_eval", expr)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynvim/msgpack_rpc/session.py", line 102, in reques
t
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim:E684: list index out of range: 0

I'm using: neovim==0.6.0 goyo==1.6.0(???) vimade==0.0.5,

I saw there is a related commits dad8122, but I don't have any clues how to fix it. Can anyone help?

YuCao16 avatar Jan 11 '22 16:01 YuCao16

Actually, I have found a less elegant solution, if I quit Goyo by :q and type :so ~/.config/nvim/init.vim, it will return to the origin window. The reason I refresh init.vim is I set background transparent and it can restart Vimade, as well. However, if possible, it is still hoped that other solutions can be found, Thanks!

YuCao16 avatar Jan 11 '22 22:01 YuCao16

Latest update should fix this error, let me know if not

TaDaa avatar Jan 12 '22 03:01 TaDaa

It works, thanks for your help!

In case some people also use transparent background, with amazing Vimade and Goyo,

function! s:QuitGoyo()
    hi Normal guibg=NONE ctermbg=NONE
    hi NonText ctermbg=NONE guibg=NONE
endfunction
autocmd! User GoyoLeave nested call <SID>QuitGoyo()

this function above will reset background when you quit Goyo.

YuCao16 avatar Jan 12 '22 10:01 YuCao16

Thanks for reporting! Closing this issue

TaDaa avatar Aug 12 '24 06:08 TaDaa