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

ivy.el: Drop preselected candidate after input #1573

Closed

Conversation

@raxod502
Copy link
Contributor

commented May 15, 2018

Suggested fix for #1563.

@raxod502 raxod502 force-pushed the raxod502:feat/override-preselected-on-input branch May 15, 2018

ivy.el Outdated
;; If there was a preselected candidate, don't try to
;; keep it selected even if the regexp still matches
;; it. See issue #1563. See also `ivy--preselect-index',
;; which this logic roughly mirrors.

This comment has been minimized.

Copy link
@basil-conto

basil-conto May 15, 2018

Collaborator

Nitpick: please honour the sentence-end-double-space setting in dir-locals-file.

ivy.el Outdated
(and (stringp (ivy-state-preselect ivy-last))
(string-match-p
(ivy-state-preselect ivy-last)
(ivy-state-current ivy-last)))))

This comment has been minimized.

Copy link
@basil-conto

basil-conto May 15, 2018

Collaborator

Nitpick: might be nice to bind ivy-state-preselect and ivy-state-current to reduce visual clutter (and avoid duplicate calls).

This comment has been minimized.

Copy link
@basil-conto

basil-conto May 15, 2018

Collaborator

(Seeing as there are other calls to these accessors in the function as well.)

@raxod502 raxod502 force-pushed the raxod502:feat/override-preselected-on-input branch May 15, 2018

@raxod502

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2018

@basil-conto Good ideas! I made the relevant changes.

ivy.el Outdated
;; See issue #1563. See also `ivy--preselect-index',
;; which this logic roughly mirrors.
(not (let ((preselect (ivy-state-preselect ivy-last))
(current (ivy-state-current ivy-last)))

This comment has been minimized.

Copy link
@basil-conto

basil-conto May 15, 2018

Collaborator

Nitpick: Again, there are other parts of ivy--recompute-index which could make use of these bindings.

@raxod502 raxod502 force-pushed the raxod502:feat/override-preselected-on-input branch to 01c2dda May 21, 2018

@raxod502

This comment has been minimized.

Copy link
Contributor Author

commented May 21, 2018

@basil-conto Fixed, thanks.

@raxod502

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2018

@abo-abo Any comments?

@abo-abo abo-abo closed this in 0cf0e6d Jul 3, 2018

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Jul 3, 2018

Merged, thanks.

raxod502 added a commit to raxod502/prescient.el that referenced this pull request Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.