Runner pane setting invalid after closing runner pane
redxtech opened this issue · comments
Hey,
I am wondering if this is intended behavior:
- Send command with
VtrSendCommandToRunner! <command>
: A new runner pane opens (because of the!
) and the specified command is run in it. - Navigate to the runner pane and running
exit
: The runner pane exits. - Send another command with
VtrSendCommandToRunner! <command>
(once again with the!
, expecting a new runner pane to open up, since the old one is gone): No pane opens, and I am shown an error message ofVTR: Runner pane setting (2) is invalid. Please reattach.
I am unable to reattach, because when I send that command I see VTR: No detached runner pane.
When I try to open a new pane with VtrOpenRunner
nothing happens, and I don't see an error either.
To fix this I have to manually create a new pane with the same pane_index
as the runner.
I'm wondering if this is intended behavior, or if running VtrSendCommandToRunner!
is supposed to open a new runner if the previous one was exited by a means other than VtrKillRunner
.
This is intended functionality, although admittedly not ideal. It's difficult (impossible?) for the plugin to stay perfectly in sync.
That said, I think you can achieve a similar workflow by managing the tmux panes a bit more directly through the plugin:
- Send command with VtrSendCommandToRunner! : A new runner pane opens (because of the !) and the specified command is run in it.
- Close the pane with
:VtrKillRunner
command. - Reopen again as needed with
:VtrSendCommandToRunner!
If at any point you get out of sync, you can manually open a pane, and then use : VtrAttachToPane
to re-attach to the desired pane (the plugin will prompt for the pane to attach to if more than one other pane is open).
:VtrReattachRunner
is meant to only be used after running :VtrDetachRunner
.
Hopefully, that clarifies and you're able to have a workflow that suits your needs. I'm going to close this now as I don't believe there is any core issue, and I'm hopeful the above provides all you need, but please feel free to comment or reopen if you think I've missed anything.
Yeah that makes sense. Doesn't avoid the problem of accidentally closing a pane with exit
instead of the proper command, but that might just take some getting used to.
Thanks for the info.