Skip to content

Commit

Permalink
fix the first call to sync functions returning null (#496)
Browse files Browse the repository at this point in the history
This happens only right after instantiation of the plugin class, so
calling any other asynchronous function seemingly fixes the problem.

Fixes #434
  • Loading branch information
dmitmel committed Aug 26, 2021
1 parent 581cba4 commit 318c1b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynvim/plugin/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def _wrap_delayed_function(self, cls, delayed_handlers, name, sync,
self._discover_functions(plugin, module_handlers, path, False)

if sync:
self._request_handlers[name](*args)
return self._request_handlers[name](*args)
else:
self._notification_handlers[name](*args)
return self._notification_handlers[name](*args)

def _wrap_function(self, fn, sync, decode, nvim_bind, name, *args):
if decode:
Expand Down

0 comments on commit 318c1b5

Please sign in to comment.