Trim the translation result
Make sure the result is shown in the echo area when the translation is a single line followed by a number of trailing newlines.
This commit is contained in:
parent
2240dd4a47
commit
4ab79511c9
1 changed files with 1 additions and 1 deletions
2
kagi.el
2
kagi.el
|
@ -451,7 +451,7 @@ result is short, otherwise it is displayed in a new buffer."
|
||||||
"")
|
"")
|
||||||
target-language
|
target-language
|
||||||
text))
|
text))
|
||||||
(result (kagi-fastgpt prompt))
|
(result (string-trim (kagi-fastgpt prompt)))
|
||||||
(result-lines (length (string-lines result))))
|
(result-lines (length (string-lines result))))
|
||||||
(cond ((and interactive-p (eql result-lines 1)) (message result))
|
(cond ((and interactive-p (eql result-lines 1)) (message result))
|
||||||
((and interactive-p (> result-lines 1)) (kagi--fastgpt-display-result result))
|
((and interactive-p (> result-lines 1)) (kagi--fastgpt-display-result result))
|
||||||
|
|
Loading…
Reference in a new issue