mirror of
https://github.com/hexedtech/codemp-sublime.git
synced 2025-03-29 21:01:34 +01:00
fix create buffer input handlers
This commit is contained in:
parent
feed0fa9c9
commit
c97a276d71
1 changed files with 11 additions and 10 deletions
|
@ -117,16 +117,17 @@ class CodempCreateBufferCommand(sublime_plugin.WindowCommand):
|
||||||
return "Create Buffer: "
|
return "Create Buffer: "
|
||||||
|
|
||||||
def input(self, args):
|
def input(self, args):
|
||||||
if "workspace_id" not in args:
|
missingargs = [arg for arg in ["workspace_id", "buffer_id"] if arg not in args]
|
||||||
wslist = session.client.active_workspaces()
|
for arg in missingargs:
|
||||||
return SimpleListInput(
|
if arg == "workspace_id":
|
||||||
("workspace_id", wslist),
|
return SimpleListInput([
|
||||||
)
|
("workspace_id", session.client.active_workspaces()),
|
||||||
|
("buffer_id", "new buffer name")
|
||||||
if "buffer_id" not in args:
|
])
|
||||||
return SimpleTextInput(
|
if arg == "buffer_id":
|
||||||
("buffer_id", "new buffer name"),
|
return SimpleTextInput(
|
||||||
)
|
("buffer_id", "new buffer name"),
|
||||||
|
)
|
||||||
|
|
||||||
def run(self, workspace_id, buffer_id):# pyright: ignore[reportIncompatibleMethodOverride]
|
def run(self, workspace_id, buffer_id):# pyright: ignore[reportIncompatibleMethodOverride]
|
||||||
try: vws = workspaces.lookupId(workspace_id)
|
try: vws = workspaces.lookupId(workspace_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue