Skip to content

Commit

Permalink
Fixed status eval not clearing on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Dec 7, 2023
1 parent e6df100 commit d2b616c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 3.4.1 - Dec 7, 2023

- Fixed status eval not clearing on disconnect

### 3.4.0 - Nov 30, 2023

- Support multiple windows, one connection per widnow
Expand Down
2 changes: 1 addition & 1 deletion cs_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def disconnect(self):
state = cs_common.get_state()
state.conn = None
cs_common.set_status(self.window, status_key, None)
cs_eval.erase_evals(lambda eval: eval.view.window == self.window)
cs_eval.erase_evals(lambda eval: eval.window == self.window)
cs_warn.reset_warnings(self.window)

def set_status(self, phase, message, *args):
Expand Down
2 changes: 2 additions & 0 deletions cs_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Eval:
id: int
batch_id: int
view: sublime.View
window: sublime.Window
status: str # "pending" | "interrupt" | "success" | "exception" | "lookup"
code: str
session: str
Expand All @@ -36,6 +37,7 @@ def __init__(self, view, region, id = None, batch_id = None):
self.id = id
self.batch_id = batch_id or id
self.view = view
self.window = view.window()
self.code = view.substr(region)
self.session = None
self.ex_source = None
Expand Down

0 comments on commit d2b616c

Please sign in to comment.