-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
Leverage actions-on-current-suggestion
as a list.
#2632
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,10 +242,17 @@ For instance, to include images: | |
:key #'prompter:value) | ||
(append matching-hints other-hints)))) | ||
(prompter:selection-actions | ||
(unless (fit-to-prompt-p (find-submode 'hint-mode)) | ||
(lambda (suggestion) | ||
(highlight-selected-hint :element suggestion | ||
:scroll nil)))) | ||
(list (unless (fit-to-prompt-p (find-submode 'hint-mode)) | ||
(lambda-command highlight-selected-hint* (suggestion) | ||
"Highlight hint." | ||
(highlight-selected-hint :element suggestion))) | ||
(lambda-command scroll-to-selected-hint* (suggestion) | ||
"Highlight and scroll to hint." | ||
(highlight-selected-hint :element suggestion :scroll t)) | ||
(lambda-command copy-selected-hint* (suggestion) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it actually make sense as a selection action? A crazy idea: make both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're referring to
I think I understand what you mean and I agree. The only obstacle is that Actions should be defined in such a way that it could be used in both cases. If we look at the particular of |
||
"Copy hint URL to clipboard." | ||
(highlight-selected-hint :element suggestion :scroll t) | ||
(copy-to-clipboard (plump:attribute suggestion "href"))))) | ||
(prompter:marks-actions | ||
(lambda (marks) | ||
(let ((%marks (mapcar (lambda (mark) (str:concat "#nyxt-hint-" (identifier mark))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are NIL values deleted from the
selection-actions
list? Maybe they should be...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point! I think they should. Should have been part of #2555...