fix(lookup): correctly scrape identifier in pdf-view-mode

This commit is contained in:
Salih Muhammed 2023-07-22 18:14:03 +03:00 committed by GitHub
parent b697682225
commit 3e3af2a629
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -408,6 +408,8 @@ Otherwise, falls back on `find-file-at-point'."
"Look up the definition of the word at point (or selection)." "Look up the definition of the word at point (or selection)."
(interactive (interactive
(list (or (doom-thing-at-point-or-region 'word) (list (or (doom-thing-at-point-or-region 'word)
(if (equal major-mode 'pdf-view-mode)
(car (pdf-view-active-region-text)))
(read-string "Look up in dictionary: ")) (read-string "Look up in dictionary: "))
current-prefix-arg)) current-prefix-arg))
(message "Looking up dictionary definition for %S" identifier) (message "Looking up dictionary definition for %S" identifier)