Use delete_buf instead of sending a manual delete_buf event.
@@ -63,10 +63,7 @@ class Listener(sublime_plugin.EventListener):
continue
if os.path.exists(f):
continue
- agent.send({
- 'name': 'delete_buf',
- 'id': buf['id'],
- })
+ agent.delete_buf(buf['path'])
return
if command == 'delete_folder':
@@ -81,10 +78,7 @@ class Listener(sublime_plugin.EventListener):
continue
for buf_id, buf in G.AGENT.bufs.items():
if buf['path'].startswith(rel_path):
- agent.send({
- 'name': 'delete_buf',
- 'id': buf_id,
- })
+ agent.delete_buf(buf['path'])
@if_connected
def on_window_command(self, window, command, *args, **kwargs):
