Cannot cancel from URL mode after upgrading to 1.8.0 #614

Closed
opened 4 months ago by ddevault · 5 comments

My cancel bindings no longer seem to work.

[url-bindings]
# cancel=Control+g Control+d Escape
# toggle-url-visible=t
cancel=Control+c Control+g Control+d Escape
My cancel bindings no longer seem to work. ``` [url-bindings] # cancel=Control+g Control+d Escape # toggle-url-visible=t cancel=Control+c Control+g Control+d Escape ```
Owner

Well isn't this embarassing...

FWIW, the default bindings work just fine, and Control+c is now included, so workaround is simply to remove your custom bindings.

Well isn't this embarassing... FWIW, the default bindings work just fine, and <kbd>Control</kbd>+<kbd>c</kbd> is now included, so workaround is simply to remove your custom bindings.
dnkl added the
bug
label 4 months ago
Collaborator

I can reproduce. git bisect seems to show 495c730487 as the commit that introduced the problem.

I can reproduce. `git bisect` seems to show 495c7304878bdd010dc5d25620dc68f41ac4cd36 as the commit that introduced the problem.
Owner

It seems to be specific to cancel. toggle-url-visible works.

It seems to be specific to `cancel`. `toggle-url-visible` works.
Owner

Got it. When replacing an existing binding (for example, when replacing the default binding with a custom binding), we currently don't erase the old bindings from the array, but instead mark them as "unused" (action == BIND_ACTION_URL_NONE). The new bindings are then inserted at the end.

When translating the bindings for a given keymap, we're supposed to ignore BIND_ACTION_URL_NONE. This is done for regular key bindings and search bindings, but not URL bindings.

But, I think the proper solution is to remove/replace the old bindings, instead of marking them as unused.

Got it. When replacing an existing binding (for example, when replacing the default binding with a custom binding), we currently don't erase the old bindings from the array, but instead mark them as "unused" (action == `BIND_ACTION_URL_NONE`). The new bindings are then inserted at the end. When translating the bindings for a given keymap, we're supposed to ignore `BIND_ACTION_URL_NONE`. This is done for regular key bindings and search bindings, but **not** URL bindings. But, I think the proper solution is to remove/replace the old bindings, instead of marking them as unused.
Owner

a09f928175 is a temporary fix.

https://codeberg.org/dnkl/foot/commit/a09f92817541c5935fda51f11004b7baae06f2ca is a temporary fix.
dnkl closed this issue 4 months ago
dnkl referenced this issue from a commit 4 months ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.