Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use copy-mode -q to leave copy mode before running a command #232

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

mvanderkamp
Copy link
Member

@mvanderkamp mvanderkamp commented Aug 27, 2024

Fixes #230

Four years ago tmux introduced a -q flag to copy-mode: tmux/tmux@06c3079

Using copy-mode -q on the runner instead of relying on the q mapping, which could be remapped, should be more reliable.

This updates the default value of VimuxResetSequence from "q C-u" to simply "C-u".

This will pose problems for users on a tmux version older than the introduction of the -q flag (before version 3.2a). We could perhaps catch the unknown flag error and try using q in those cases.

alerque
alerque previously approved these changes Aug 27, 2024
@mvanderkamp
Copy link
Member Author

I thought it would be prudent to put in a fallback for older versions so the runner prompt is still cleared. I haven't found the precise cause of this issue in tmux. Since we haven't changed our logic it seems likely that this stems from a recent tmux release and that the q C-u reset sequence used to work properly.

@mvanderkamp
Copy link
Member Author

@alerque Looks like I need a fresh approval, sorry about that!

@alerque
Copy link
Member

alerque commented Sep 19, 2024

No worries, tweaking things in PRs to get them as right as we know how before merging is the right thing to do. That being said I've watched your contributions for a while and don't think there is any need for the friction of waiting for a rubber stamp from me. I just upgraded your access to this repo to Admin level so you should be able to skip the 1-review-needed requirement. Have fun.

Everybody else: please welcome your new overlord!

@mvanderkamp
Copy link
Member Author

Thank you!!

@mvanderkamp mvanderkamp merged commit 64df7ce into preservim:master Sep 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Not in a mode" error from VimuxRunCommand in scroll mode
2 participants