Do not attempt to insert in read-only buffers
This commit is contained in:
parent
0321b635c0
commit
a0dd0346a2
1 changed files with 1 additions and 1 deletions
2
kagi.el
2
kagi.el
|
@ -394,7 +394,7 @@ If INSERT is non-nil, the response is inserted at point.
|
|||
Otherwise, show the result in a separate buffer."
|
||||
(interactive "sfastgpt> \nP")
|
||||
(let ((result (kagi-fastgpt prompt)))
|
||||
(if insert
|
||||
(if (and insert (not buffer-read-only))
|
||||
(save-excursion
|
||||
(insert result))
|
||||
(kagi--fastgpt-display-result result))))
|
||||
|
|
Loading…
Reference in a new issue