branch: externals/ellama
commit 06ad60d117a8c258a9879d2b68f4b6541ef038c7
Author: Sergey Kostyaev <[email protected]>
Commit: Sergey Kostyaev <[email protected]>
fix upate selected region with ellama (fixes #6)
---
ellama.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ellama.el b/ellama.el
index 0378092777..3bd671950e 100644
--- a/ellama.el
+++ b/ellama.el
@@ -101,9 +101,10 @@ Filter PROC output STRING."
(let ((moving (= (point) (process-mark proc))))
;; Insert the text, advancing the process marker.
;; For buffers other than ellama-buffer, stay on current point.
- (when (string= (buffer-name (process-buffer proc))
- ellama-buffer)
- (goto-char (process-mark proc)))
+ (if (string= (buffer-name (process-buffer proc))
+ ellama-buffer)
+ (goto-char (process-mark proc))
+ (set-marker (process-mark proc) (point)))
(when ellama--unprocessed-data
(setq string (concat ellama--unprocessed-data string)))
(condition-case nil