Crash when cursor is not in code panel
When a redraw call occurs and cursor is not in the code panel, coquille crashes with:
error caught while executing async callback:
NvimError(b'Failed to evaluate expression',)
Traceback (most recent call last):
File "/home/tyreunom/.config/nvim/bundle/coquille/rplugin/python3/pycoqtop/__init__.py", line 15, in recolor
obj.redraw()
File "/home/tyreunom/.config/nvim/bundle/coquille/rplugin/python3/pycoqtop/__init__.py", line 475, in redraw
if int(self.vim.eval('b:checked')) != -1:
File "/home/tyreunom/vsfi-coq/.guix-profile/lib/python3.6/site-packages/neovim/api/nvim.py", line 250, in eval
return self.request('nvim_eval', string, **kwargs)
File "/home/tyreunom/vsfi-coq/.guix-profile/lib/python3.6/site-packages/neovim/api/nvim.py", line 140, in request
res = self._session.request(name, *args, **kwargs)
File "/home/tyreunom/vsfi-coq/.guix-profile/lib/python3.6/site-packages/neovim/msgpack_rpc/session.py", line 98, in request
raise self.error_wrapper(err)
neovim.api.nvim.NvimError: b'Failed to evaluate expression'
the call was requested at
File "/home/tyreunom/.config/nvim/bundle/coquille/rplugin/python3/pycoqtop/coqtop.py", line 53, in run
self.coqtop.remove_answer(ans, message.type)
File "/home/tyreunom/.config/nvim/bundle/coquille/rplugin/python3/pycoqtop/coqtop.py", line 231, in remove_answer
self.printer.parseMessage(r, msgtype)
File "/home/tyreunom/.config/nvim/bundle/coquille/rplugin/python3/pycoqtop/__init__.py", line 357, in parseMessage
self.ask_redraw()
File "/home/tyreunom/.config/nvim/bundle/coquille/rplugin/python3/pycoqtop/__init__.py", line 255, in ask_redraw
self.vim.async_call(recolor, self)