emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3833ce16af: Fix shr--set-target-ids test for empty buffer


From: Lars Ingebrigtsen
Subject: master 3833ce16af: Fix shr--set-target-ids test for empty buffer
Date: Tue, 21 Jun 2022 14:51:51 -0400 (EDT)

branch: master
commit 3833ce16afe930a57554667afc16b20ce258983d
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix shr--set-target-ids test for empty buffer
    
    * lisp/net/shr.el (shr--set-target-ids): Fix the check for an
    empty buffer (which may be narrowed).
---
 lisp/net/shr.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index b269607e32..0645f4721a 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -399,7 +399,7 @@ DOM should be a parse tree as generated by
 
 (defun shr--set-target-ids (ids)
   ;; If the buffer is empty, there's no point in setting targets.
-  (unless (zerop (buffer-size))
+  (unless (zerop (- (point-max) (point-min)))
     ;; We may have several targets in the same place (if you have
     ;; several <span id='foo'> things after one another).  So group
     ;; them by position.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]