Exit copy-mode when clearing terminal screen #233
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for identifying and fixing the issue with reset in #230! What do you think about invoking reset from
VimuxClearTerminalScreen()
as well? Currently, this command does nothing if the Vim pane is in copy mode.Ultimately my goal is for vim-test to clear the screen, clear the scrollback buffer, and run the tests. And do all of this regardless of whether the pane was left in copy-mode.
Right now, vim-test performs the following (reference):
Since
VimuxRunCommand
is currently the only function that executes the reset sequence, the first two functions (VimuxClearTerminalScreen
andVimuxClearRunnerHistory
) do nothing in copy mode. This PR modifiesVimuxClearTerminalScreen
to also execute the reset sequence.Other possible solutions
call VimuxRunCommand("")
before the three lines above, but that approach feels somewhat hacky.VimuxReset()
function that vim-test could call before executing the lines above. However, I believe VimuxClearTerminalScreen() should ideally handle exiting copy-mode itself.