branch: elpa/logview
commit cace8921fa3f4983714da1298ccc8ebf4766ad72
Author: Paul Pogonyshev <[email protected]>
Commit: Paul Pogonyshev <[email protected]>

    Fix 'logview-append-log-file-tail' which would fail with an error if the 
buffer was narrowed not far from its end.
---
 logview.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/logview.el b/logview.el
index 341c4da9c8..f4c024d35f 100644
--- a/logview.el
+++ b/logview.el
@@ -1298,7 +1298,9 @@ should be as simple as typing 
\\<logview-mode-map>\\[logview-append-log-file-tai
         (unless (and (>= temporary-size reassurance-chars)
                      (string= (buffer-substring-no-properties 1 (1+ 
reassurance-chars))
                               (with-current-buffer buffer
-                                (buffer-substring-no-properties compare-from 
size))))
+                                (save-restriction
+                                  (widen)
+                                  (buffer-substring-no-properties compare-from 
size)))))
           (user-error "Buffer contents doesn't match the head of %s anymore" 
file))
         (if (= temporary-size reassurance-chars)
             (message "Backing file %s hasn't grown" file)

Reply via email to