aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-11-16 21:52:34 +0200
committerEli Zaretskii2018-11-16 21:52:34 +0200
commitd6542ea0f032d154da5a6e896a860adc9176a00a (patch)
treeb10c53e36f10fe2b5e85811494cd77edd81ef40f
parent936a8f3093f53442bb759880c8cddd5f4eb539a5 (diff)
downloademacs-d6542ea0f032d154da5a6e896a860adc9176a00a.tar.gz
emacs-d6542ea0f032d154da5a6e896a860adc9176a00a.zip
Avoid errors in zone.el when there's overlay at EOB
* lisp/play/zone.el (zone): Make sure the window-end position is calculated accurately, to avoid errors from buffer-substring. (Bug#33384)
-rw-r--r--lisp/play/zone.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 4584d26f385..75f13646190 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -109,7 +109,7 @@ If the element is a function or a list of a function and a number,
109 (save-window-excursion 109 (save-window-excursion
110 (let ((f (selected-frame)) 110 (let ((f (selected-frame))
111 (outbuf (get-buffer-create "*zone*")) 111 (outbuf (get-buffer-create "*zone*"))
112 (text (buffer-substring (window-start) (window-end))) 112 (text (buffer-substring (window-start) (window-end nil t)))
113 (wp (1+ (- (window-point) 113 (wp (1+ (- (window-point)
114 (window-start))))) 114 (window-start)))))
115 (put 'zone 'orig-buffer (current-buffer)) 115 (put 'zone 'orig-buffer (current-buffer))