[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33384: [PATCH] Fix zone.el when window is at the bottom of the buffe
From: |
deb0ch |
Subject: |
bug#33384: [PATCH] Fix zone.el when window is at the bottom of the buffer |
Date: |
Wed, 14 Nov 2018 16:48:02 +0100 |
(window-end) returns the size of the buffer + 1 when the end of the
buffer is inside the window, whereas to get the end of the
buffer (buffer-substring) needs the size of the buffer and will throw
an error if given anything greater.
---
lisp/play/zone.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 4584d26f38..90340e74e9 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,
(save-window-excursion
(let ((f (selected-frame))
(outbuf (get-buffer-create "*zone*"))
- (text (buffer-substring (window-start) (window-end)))
+ (text (buffer-substring (window-start) (1- (window-end))))
(wp (1+ (- (window-point)
(window-start)))))
(put 'zone 'orig-buffer (current-buffer))
--
2.15.1 (Apple Git-101)
- bug#33384: [PATCH] Fix zone.el when window is at the bottom of the buffer,
deb0ch <=