remove the timeout async call

This commit is contained in:
cschen 2025-02-17 22:51:39 +01:00
parent d5399141e1
commit ed29c0c62a

View file

@ -101,15 +101,17 @@ class CodempLeaveBufferCommand(sublime_plugin.WindowCommand):
logging.error("The desired buffer is not managed by the workspace.")
return
def _():
try:
buffers.remove(buffer_id)
finally:
if not vws.handle.detach_buffer(buffer_id):
logger.error(f"could not leave the buffer {buffer_id}.")
sublime.set_timeout_async(_)
try:
buffers.remove(buffer_id)
# del buff
# gc.collect()
finally:
if not vws.handle.detach_buffer(buffer_id):
logger.error(f"could not leave the buffer {buffer_id}.")
else:
logger.debug(f"successfully detached from {buffer_id}.")
# Leave Buffer Comand
# Create Buffer Comand
class CodempCreateBufferCommand(sublime_plugin.WindowCommand):
def is_enabled(self):
return len(workspaces.lookup()) > 0