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

fix: allow multiple global unbinds in KDL config #2387

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

Conversation

timmclean
Copy link

Fixes #2354

The keybinding config logic didn't handle the case where there were multiple global unbinds:

keybinds {
    unbind "a"
    unbind "b"
    unbind "c"

    pane {
      unbind "d"
      unbind "e"
    }
}

The unbinds for "b" and "c" are ignored. Note that the unbinds for "d" and "e" both work properly though, so this seems like a bug.

This PR makes a small change to the config parsing logic to handle the case where there are multiple unbind nodes directly under the keybinds node.

It adds a test for the global unbind case, and also adds a test for the case where there are multiple unbind nodes under a particular mode's node within keybinds (a case that was already working but didn't have a test).

Handle the case where there are multiple "unbind" nodes directly under the "keybinds" node.

Add a test for this case, and also the case where there are multiple
"unbind" nodes under a "pane" node within "keybinds" (which was already
working).
@timmclean
Copy link
Author

The e2e tests seem to pass when I run them locally. Might be a flaky test issue?

@timmclean timmclean temporarily deployed to cachix April 25, 2023 11:45 — with GitHub Actions Inactive
@tlinford
Copy link
Contributor

The e2e tests seem to pass when I run them locally. Might be a flaky test issue?

Yep green after a rerun :)

@rio
Copy link

rio commented Sep 7, 2023

Ran into this today. Any chance of getting this merged?

@r-vdp
Copy link

r-vdp commented Oct 26, 2023

I've been running with this patch for the last couple of weeks and it solves the issue and doesn't seem to cause any issues.

@r-vdp
Copy link

r-vdp commented Nov 13, 2023

@imsnif this patch still works with 0.39 and fixes an important issue with unbinding multiple global keys.

I've been running with this patch for a while now, and it works fine.

Is there any reason not to merge this?

@r-vdp
Copy link

r-vdp commented Dec 25, 2023

@imsnif friendly ping, did you get the chance to review this? Is there any reason not to merge this and solve the bug with multiple global unbinds?

@imsnif
Copy link
Member

imsnif commented Dec 26, 2023

Hi - I did not have a chance to review this. While I realize you're disappointed at not seeing this merged, please take a look at the amount of open PRs and issues in this repository* and remember that 95%+ of the work in this project falls on one mostly unpaid person: yours truly.

I wish I could give everything the priority it needs, but unfortunately I am a mere mortal. Thanks for your patience.

*And of course these two categories are only a small fraction of the work that needs to be done here...

@r-vdp
Copy link

r-vdp commented Dec 26, 2023

I understand. Sorry for being pushy. I guess that I felt that the PR might have slipped under the radar.

I do appreciate the tremendous work you're doing with zellij and I understand that this must be very time consuming.

So thank you for that and my apologies for the unnecessary pings.

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.

Only the first unbind is being picked up
5 participants