From 3ea68948c6c4f03504d8232c3b8105e77e0ee483 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 23 Sep 2017 11:20:38 -0500 Subject: Do not set geiser last-prompt-end beyond of point-max --- elisp/geiser-repl.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'elisp') 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))) -- cgit v1.2.3