-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP features are not working on other half after "split tab" action. #4166
Comments
Python IntelliSense plugin-- works ok in other half. so, it is the LSP plugin issue, not Cud's. I need to check it uses "ed" properly. "ed" object is always the focused editor. |
Related APIs: I searched the LSP plugin code but failed to find the reason. I just found that internal LSP-msg-handler is not called at all when we are in the secondary editor. This msg-handler calls the ed.complete_alt() API, only for primary editor. |
handler is here: file language.py, |
problem is in @command
def on_complete(self, ed_self):
doc = self.book.get_doc(ed_self)
if doc and doc.lang:
return doc.lang.on_complete(doc)
the simple solution I came up with looks like this: diff --git a/lsp.py b/lsp.py
index c7660d9..3f93953 100644
--- a/lsp.py
+++ b/lsp.py
@@ -306,6 +306,7 @@ class Command:
lang.update_tree(doc)
def on_focus(self, ed_self):
+ self._do_on_open(ed_self)
doc = self.book.get_doc(ed_self)
if doc and doc.lang and doc.lang.tree_enabled:
doc.lang.update_tree(doc)
so every time we click on other half of split it will trigger BUT... but i'm not sure i know how to debug it correctly. maybe it's not fault of do you have experience with debugging memory leaks like these? PS: we can think of another way to fix this Cuda_LSP split tab issue as well. |
it's strange that Py script gives leak. all leaks must be handled by Py GC, no? if they are not, we need to write |
it's programmers (mine) fault not python GC's. must think of a different way to handle this situation. |
for Differ plugin:
|
for me, your fix looks normal. API don't tell us to call any on_close. |
it grows +150-300 kb everytime you switch focus between halfs. do you see that on linux? |
RES column? 63004 bytes? |
VIRT column: 510M (includes LSP server mem) |
"VIRT represents how much memory the program is able to access at the present moment. RES stands for the resident size, which is an accurate representation of how much actual physical memory a process is consuming." |
aha, sorry. ok, RES memory grows after on_focus on each half! by +20...+100. |
we cannot solve it, you didnt try more, @veksha ? |
not tried. |
LSP features are not working on other half after "split tab" action.
The text was updated successfully, but these errors were encountered: