summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 8720a68..ab101e0 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -303,7 +303,9 @@ module command as a string")
(marker-position (cdr comint-last-prompt)))
((and (boundp 'comint-last-prompt-overlay) comint-last-prompt-overlay)
(overlay-end comint-last-prompt-overlay))
- (t (save-excursion (geiser-repl--bol) (+ 1 (point))))))
+ (t (save-excursion
+ (geiser-repl--bol)
+ (min (+ 1 (point)) (point-max))))))
(defun geiser-repl--last-prompt-start ()
(cond ((and (boundp 'comint-last-prompt) (markerp (car comint-last-prompt)))