Fri, 13 Oct 2023 08:30:15 +0200
jedi Interface
- Improved the code to be more reliable on slow computers.
src/eric7/JediInterface/AssistantJedi.py | file | annotate | diff | comparison | revisions | |
src/eric7/JediInterface/JediServer.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/JediInterface/AssistantJedi.py Thu Oct 12 17:23:13 2023 +0200 +++ b/src/eric7/JediInterface/AssistantJedi.py Fri Oct 13 08:30:15 2023 +0200 @@ -151,6 +151,7 @@ self.__disconnectMouseClickHandler(editor) editor.unregisterMouseHoverHelpFunction(self.__jediServer.hoverHelp) + self.__jediServer.forgetEditor(editor) with contextlib.suppress(TypeError): editor.showMenu.disconnect(self.__editorShowMenu)
--- a/src/eric7/JediInterface/JediServer.py Thu Oct 12 17:23:13 2023 +0200 +++ b/src/eric7/JediInterface/JediServer.py Fri Oct 13 08:30:15 2023 +0200 @@ -985,3 +985,16 @@ self.sendJson("closeProject", {}, idString=JediServer.IdProject) self.stopClient(idString=JediServer.IdProject) + + def forgetEditor(self, editor): + """ + Public method to forget about the given editor. + + @param editor reference to the editor to forget about + @type Editor + """ + for uid in self.__editors: + if self.__editors[uid] is editor: + with contextlib.suppress(KeyError): + del self.__editors[uid] + break