Closed bbtdev closed 5 years ago
Hm. This just happens for some buffers it seems.
I can trigger this reliably by issuing :help $SOMETHING
. It seems that the on_warmup
method is called while another invocation of on_warmup
is only half-way through.
This is bad, as the current code is not reentrant-safe. Locking is impossible as this would create a deadlocking in pynvim's msgpack-code.
The following workaround works for me:
diff --git a/pythonx/ncm2_otherbuf.py b/pythonx/ncm2_otherbuf.py
index dc1ad66..2b78e4b 100644
--- a/pythonx/ncm2_otherbuf.py
+++ b/pythonx/ncm2_otherbuf.py
@@ -80,9 +81,9 @@ class Source(Ncm2Source):
if self.active_bufnr is not None:
self.buffers[self.active_bufnr].changed = True
- self.active_bufnr = bufnr
self.update()
+ self.active_bufnr = bufnr
source = Source(vim)
I would love to fully understand what's going on and how other nvim plugins handle such cases.
@bbtdev Can you check that my change really fixes your issue?
@fgrsnau today there was a lot of bug fixing and trial and error, I didn't write so much code, so I did not noticed. You will get an update for me tomorrow or in a 2 days, when I am back to coding (proper testing for this plugin). Is this okay?
@fgrsnau I had an error today, when I opened with FZF the :History buffer. I can't reproduce atm, but I work with Fzf a lot, so I will keep you posted.
Hey first all thank you for doing this, I needed this completion back in my life.
Sadly I am encountering some issues. This is in my messages and the completion source does not work.