mirror of
https://github.com/hexedtech/codemp-sublime.git
synced 2025-03-26 03:31:32 +01:00
attempts at better dropping procedure for buffers
This commit is contained in:
parent
19bbc9c646
commit
b66f85caf7
1 changed files with 4 additions and 2 deletions
|
@ -80,7 +80,9 @@ class BufferManager():
|
|||
|
||||
def __del__(self):
|
||||
logger.debug(f"dropping buffer {self.id}")
|
||||
self.view.close()
|
||||
self.handle.clear_callback()
|
||||
self.handle = None
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.id)
|
||||
|
@ -154,7 +156,7 @@ class BufferRegistry():
|
|||
syntax = sublime.find_syntax_for_file(bid)
|
||||
if syntax:
|
||||
view.assign_syntax(syntax)
|
||||
|
||||
|
||||
view.settings().set(g.CODEMP_VIEW_TAG, True)
|
||||
view.settings().set(g.CODEMP_BUFFER_ID, bid)
|
||||
view.set_status(g.SUBLIME_STATUS_ID, "[Codemp]")
|
||||
|
@ -170,7 +172,7 @@ class BufferRegistry():
|
|||
bf = self.lookupId(bf)
|
||||
|
||||
del self._buffers[bf]
|
||||
bf.view.close()
|
||||
|
||||
|
||||
buffers = BufferRegistry()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue