scratchpads: don't fail if proc already removed
This commit is contained in:
parent
a7cc3cd4b8
commit
4a0cb5fb8f
2 changed files with 5 additions and 3 deletions
|
@ -290,8 +290,10 @@ class Extension(Plugin):
|
|||
if not item.isAlive():
|
||||
print(f"{uid} is not running, restarting...")
|
||||
self.procs[uid].kill()
|
||||
del self.scratches_by_pid[self.procs[uid].pid]
|
||||
del self.scratches_by_address[item.address]
|
||||
if item.pid in self.scratches_by_pid:
|
||||
del self.scratches_by_pid[item.pid]
|
||||
if item.address in self.scratches_by_address:
|
||||
del self.scratches_by_address[item.address]
|
||||
self.start_scratch_command(uid)
|
||||
while uid in self._respawned_scratches:
|
||||
await asyncio.sleep(0.05)
|
||||
|
|
|
@ -47,7 +47,7 @@ class Extension(Plugin):
|
|||
try:
|
||||
idx = available_workspaces.index(cur_workspace)
|
||||
except ValueError:
|
||||
next_workspace = available_workspaces[0]
|
||||
next_workspace = available_workspaces[0 if increment > 0 else -1]
|
||||
else:
|
||||
next_workspace = available_workspaces[
|
||||
(idx + increment) % len(available_workspaces)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue