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

Revert "Improve performance by binding copycat keys just once" #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kurko
Copy link

@kurko kurko commented Dec 27, 2020

This reverts commit 6bcd4dc. It broke the once
fixed issue with Yank (#121),
causing a regression. To ensure this was the problematic commit, I checked out
its parent (ca3d52d) and it's working fine
there, so I suggest we revert the broken commit.

In summary (check the link above for details), this commit breaks Tmux scrolling
completely, and after getting into scrolling no keys will work, so you can't
leave scrolling. Only workaround I found was killing tmux-server.

Conflicts: scripts/copycat_mode_bindings.sh. I fixed the conflict and tested
that it can select tokens/URLs, that I can scroll with it (which I couldn't
before this reversion). I'm not sure it won't introduce bugs, but it definitely
fixes the regression mentioned above.

I don't have much experience with this codebase, so I'm wondering if @gpanders
(original committer) if they could assist on fixing this commit and
re-reverting. Thanks.

This reverts commit 6bcd4dc. It broke the once
fixed issue with Yank (tmux-plugins#121),
causing a regression. To ensure this was the problematic commit, I checked out
its parent (ca3d52d) and it's working fine
there, so I suggest we revert the broken commit.

In summary (check the link above for details), this commit breaks Tmux scrolling
completely, and after getting into scrolling no keys will work, so you can't
leave scrolling. Only workaround I found was killing `tmux-server`.

Conflicts: scripts/copycat_mode_bindings.sh. I fixed the conflict and tested
that it can select tokens/URLs, that I can scroll with it (which I couldn't
before this reversion). I'm not sure it won't introduce bugs, but it definitely
fixes the regression mentioned above.

I don't have much experience with this codebase, so I'm wondering if @gpanders
(original committer) if they could assist on fixing this commit and
re-reverting. Thanks.

unbind_all_bindings() {
grep -v copycat <"${TMPDIR:-/tmp}/copycat_$(whoami)_recover_keys" | while read -r key_cmd; do
sh -c "tmux $key_cmd"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was the fix for #121 (original introduced in 5f6bfc0), but 6bcd4dc removed it.

kurko referenced this pull request Dec 27, 2020
All of the copycat scripts check to make sure we're in copycat mode, and
if we're not they are essentially a no-op. This means we can safely
leave the keys bound to those scripts even when we're not in copycat
mode.

The benefit of this is that we don't have to bind and unbind the keys
every time we enter or leave copycat mode, which helps improve
performance.
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.

1 participant