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 kill-ring-save for swiper-isearch #3070

Merged
merged 1 commit into from
Mar 23, 2025
Merged

Fix kill-ring-save for swiper-isearch #3070

merged 1 commit into from
Mar 23, 2025

Conversation

basil-conto
Copy link
Collaborator

The default M-w binding of ivy-kill-ring-save expects ivy--old-cands to be a list of strings, but swiper-isearch has long switched to a list of buffer positions instead.

  • ivy.el (ivy-kill-ring-save): Prefer use-region-p over region-active-p. Use string-join. Tweak docstring.
  • swiper.el: Set swiper and swiper-isearch actions closer to their corresponding commands.
    (swiper--isearch-kill-ring-save): New command modeled after ivy-kill-ring-save.
    (swiper-isearch-map): Remap ivy-kill-ring-save and kill-ring-save to it. By default, the former remap is defensive, and only the latter is needed.

Fixes #3000.
Cc: @bgoodr

The default M-w binding of ivy-kill-ring-save expects ivy--old-cands
to be a list of strings, but swiper-isearch has long switched to a
list of buffer positions instead.

* ivy.el (ivy-kill-ring-save): Prefer use-region-p over
region-active-p.  Use string-join.  Tweak docstring.
* swiper.el: Set swiper and swiper-isearch actions closer to their
corresponding commands.
(swiper--isearch-kill-ring-save): New command modeled after
ivy-kill-ring-save.
(swiper-isearch-map): Remap ivy-kill-ring-save and kill-ring-save to
it.  By default, the former remap is defensive, and only the latter
is needed.

Fixes #3000.
@basil-conto basil-conto self-assigned this Mar 23, 2025
@basil-conto basil-conto merged commit 790042e into master Mar 23, 2025
36 checks passed
@basil-conto basil-conto deleted the blc/kill branch March 23, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

M-w (‘ivy-kill-ring-save’) errors out with: kill-new: Wrong type argument: sequencep, 20944
1 participant