Skip to content

Commit

Permalink
mode/hint: Add selection-actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Oct 17, 2022
1 parent b4dc7c3 commit 065da5d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions source/mode/hint.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,16 @@ 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-command highlight-selected-hint* (suggestion)
"Highlight hint."
(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 hint."
(highlight-selected-hint :element suggestion :scroll t))
(lambda-command copy-selected-hint* (suggestion)
"Copy hint URL to clipboard."
(copy-to-clipboard (plump:attribute suggestion "href")))))
(prompter:marks-actions
(lambda (marks)
(let ((%marks (mapcar (lambda (mark) (str:concat "#nyxt-hint-" (identifier mark)))
Expand Down

0 comments on commit 065da5d

Please sign in to comment.