[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 4c3ba3a5da 331/372: - prevented calling 'annotate
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 4c3ba3a5da 331/372: - prevented calling 'annotate--remove-annotation-property' on a narrowed buffer |
Date: |
Fri, 4 Feb 2022 16:59:17 -0500 (EST) |
branch: elpa/annotate
commit 4c3ba3a5da9b67a16c114822e7943ca873dbfe1c
Author: cage <cage@invalid>
Commit: cage <cage@invalid>
- prevented calling 'annotate--remove-annotation-property' on a narrowed
buffer
For some reason (perhaps related to font-locking?) comment-region
command was calling this function, the fact is that the command
narrows the buffer before actually adding comments, so the call to
`point' inside the annotate--remove-annotation-property's body may
fall outside of the buffer raising an error. This patch prevents
calling this function on narrowed buffer.
---
annotate.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/annotate.el b/annotate.el
index 4b9d932ed7..162e418b1a 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1228,8 +1228,8 @@ a a**
(defun annotate--remove-annotation-property (begin end)
"Cleans up annotation properties associated with a region."
- (when (> (buffer-size)
- 0)
+ (when (and (> (buffer-size) 0)
+ (not (buffer-narrowed-p)))
(annotate-with-inhibit-modification-hooks
(annotate-with-disable-read-only
;; copy undo list
@@ -1242,8 +1242,7 @@ a a**
;; annotated newline used to be
(end-of-line)
;; strip dangling display property
- (remove-text-properties
- (point) (1+ (point)) '(display nil)))
+ (remove-text-properties (point) (1+ (point)) '(display nil)))
;; restore undo list
(setf buffer-undo-list saved-undo-list)
(buffer-enable-undo))))))
- [nongnu] elpa/annotate 07667d4ccb 314/372: - updated version number in top comment block., (continued)
- [nongnu] elpa/annotate 07667d4ccb 314/372: - updated version number in top comment block., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 641daae9d0 335/372: - updated docs and version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b74bade94c 345/372: - increased version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e6af7f8ef7 058/372: workaround for nil file name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate eb01c0cfbb 077/372: - removed copyright line from README., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d2841bad65 325/372: - ensured all annotations are saved before showing summary window., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6239d033ce 355/372: - updated README.org mentioning 'annotate-y-or-n-prompt-function'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 04a5710cf6 334/372: - prevented saving a file whith an empty database;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2e7c18b12a 337/372: - fixed callback for "[replace]" button in summary window, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6b73ccf009 352/372: - fixed function's name., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4c3ba3a5da 331/372: - prevented calling 'annotate--remove-annotation-property' on a narrowed buffer,
ELPA Syncer <=
- [nongnu] elpa/annotate 3b0bc40a4f 347/372: - improved docstrings;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 46aa377cfc 370/372: - upgraded version number;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 0cfad246ee 372/372: Merge pull request #120 from cage2/add-merge-db, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 401a9b4990 309/372: - removed useless argument for 'font-lock-flush'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ed0c9bc64b 184/372: - prevented annotation of text marked with a region that overlap with, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 24de0e4607 190/372: - renamed and fixed function to search for annotations relative to a, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e6fb2b31df 188/372: - fixed position to start for overlay checks in, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a81a7d9386 209/372: - updated versions;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 30ee7a0b87 198/372: - fixed 'annotate-previous-annotation-ends' and 'annotate-next-annotation-ends', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1143087515 213/372: - updated documentation., ELPA Syncer, 2022/02/04