Skip to content

Commit 318c1b5

Browse files
authored
fix the first call to sync functions returning null (#496)
This happens only right after instantiation of the plugin class, so calling any other asynchronous function seemingly fixes the problem. Fixes #434
1 parent 581cba4 commit 318c1b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pynvim/plugin/host.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def _wrap_delayed_function(self, cls, delayed_handlers, name, sync,
8989
self._discover_functions(plugin, module_handlers, path, False)
9090

9191
if sync:
92-
self._request_handlers[name](*args)
92+
return self._request_handlers[name](*args)
9393
else:
94-
self._notification_handlers[name](*args)
94+
return self._notification_handlers[name](*args)
9595

9696
def _wrap_function(self, fn, sync, decode, nvim_bind, name, *args):
9797
if decode:

0 commit comments

Comments
 (0)