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 'default' and 'copy' swiper-isearch actions #2914

Merged
merged 1 commit into from
Sep 19, 2021

Conversation

basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Sep 15, 2021

  • swiper.el (swiper--isearch-candidate-pos): New convenience function.
    (swiper-isearch-action): Use it. Check this-command when ivy-exit fails to indicate that completion is "done" following default action M-o o.
    (swiper-isearch-action-copy): New action function like swiper-action-copy, but for swiper-isearch (swiper-isearch action doesn't go to the target #2913).
    (swiper-isearch): Use it as the 'copy' action function.

Cc: @allenryb

* swiper.el (swiper--isearch-candidate-pos): New convenience
function.
(swiper-isearch-action): Use it.  Check this-command when ivy-exit
fails to indicate that completion is "done" following default action
'M-o o'.
(swiper-isearch-action-copy): New action function like
swiper-action-copy, but for swiper-isearch (issue #2913).
(swiper-isearch): Use it as the 'copy' action function.
@basil-conto basil-conto merged commit 9baa442 into master Sep 19, 2021
@basil-conto basil-conto deleted the blc/swiper-isearch branch September 19, 2021 12:25
basil-conto pushed a commit to dustinpaluch/swiper that referenced this pull request Mar 26, 2023
* swiper.el (swiper-isearch-action-insert): New function modeled
after swiper-isearch-action-copy (abo-abo#2913, abo-abo#2914).
(swiper-isearch): Override the default 'insert' action with it.

Fixes abo-abo#2929.

Copyright-paperwork-exempt: yes
basil-conto added a commit that referenced this pull request Mar 26, 2023
This takes into account swiper-goto-start-of-match and
swiper-isearch-backward, under which point precedes and does not
follow the candidate (#2913, #2914, #2929, #2963).

* swiper.el (swiper--isearch-candidate-string): New helper function.
(swiper-isearch-action-copy, swiper-isearch-action-insert): Use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant