change the way sdcv-say-word-dwim works in sdcv-mode

This commit is contained in:
zedhugh committed 2025-02-12 15:57:07 +08:00
1 parent f5bc2b137d
commit 8770d9770e
1 file changed
+4 -1
+4 -1
View File
@@ -15,7 +15,10 @@
(sdcv-say-word (sdcv-say-word
(if (region-active-p) (if (region-active-p)
(buffer-substring-no-properties (region-beginning) (region-end)) (buffer-substring-no-properties (region-beginning) (region-end))
(word-at-point t)))) (let ((word (word-at-point t)))
(when (and (not word) (eq major-mode 'sdcv-mode))
(setq word sdcv-current-translate-object))
word))))
(lazy-load-local-keys (lazy-load-local-keys
'(("s" . sdcv-search-pointer) '(("s" . sdcv-search-pointer)