[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 1350e1d073 338/372: - fixed annotated text shown
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 1350e1d073 338/372: - fixed annotated text shown in the summary window |
Date: |
Fri, 4 Feb 2022 16:59:18 -0500 (EST) |
branch: elpa/annotate
commit 1350e1d0735e3937f9435c98dfdaf8a6c4bd2c00
Author: cage <cage@invalid>
Commit: cage <cage@invalid>
- fixed annotated text shown in the summary window
when an annotated buffer (that is visiting a file) is modified in a
way that changes the position of an annotation in that buffer, showing
the summary window -without saving the file first- will read the
annotation using the updated position but getting the content from the
outdated file; this gives wrong results in the text annotation parts
of the summary windows, with the text shifted from the correct
position.
This patch try to fix this bug.
---
annotate.el | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/annotate.el b/annotate.el
index 9df2f5981e..6374d64d82 100644
--- a/annotate.el
+++ b/annotate.el
@@ -2470,6 +2470,20 @@ results can be filtered with a simple query language: see
(info-setup filename (current-buffer))
(buffer-substring-no-properties
annotation-begin
annotation-end)))
+ (build-snippet-from-buffer (filename annotation-begin
annotation-end)
+ (let ((visited-buffer (find-buffer-visiting filename)))
+ (when visited-buffer ;; a buffer is visiting the file
+ (with-current-buffer visited-buffer
+ (let ((raw-snippet (buffer-substring-no-properties
annotation-begin
+
annotation-end)))
+ (clean-snippet raw-snippet))))))
+ (build-snippet-from-file (filename annotation-begin
annotation-end)
+ (with-temp-buffer
+ (insert-file-contents filename
+ nil
+ (1- annotation-begin)
+ (1- annotation-end))
+ (clean-snippet (buffer-string))))
(build-snippet (filename annotation-begin annotation-end)
(if (file-exists-p filename)
(cond
@@ -2479,12 +2493,12 @@ results can be filtered with a simple query language:
see
annotation-begin
annotation-end)))
(t
- (with-temp-buffer
- (insert-file-contents filename
- nil
- (1-
annotation-begin)
- (1- annotation-end))
- (clean-snippet (buffer-string)))))
+ (or (build-snippet-from-buffer filename
+
annotation-begin
+
annotation-end)
+ (build-snippet-from-file filename
+
annotation-begin
+
annotation-end))))
(if (annotate-info-root-dir-p filename)
(clean-snippet (build-snippet-info filename
annotation-begin
- [nongnu] elpa/annotate 8b06586497 282/372: - fixed integration of multiline annotated text., (continued)
- [nongnu] elpa/annotate 8b06586497 282/372: - fixed integration of multiline annotated text., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 485060813b 277/372: - added procedures to pad multiline annotation text., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e004ae7e97 281/372: - updated version;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3e5d14fde8 287/372: - updated documentation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6415fb6111 294/372: - updated NEWS and CHANGELOG;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4890d2d2a2 295/372: Merge pull request #95 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 85d7c87e08 293/372: - added padding also for notes placed on the margin of the window., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ac55086d60 301/372: - fixed typo., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3415b7ac08 321/372: - changed behaviour when user is annotation a newline character;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f33eecba7b 362/372: - prevented asking to delete a database that does not actually exists, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1350e1d073 338/372: - fixed annotated text shown in the summary window,
ELPA Syncer <=
- [nongnu] elpa/annotate 3e3c1b1066 368/372: - fixed function name;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a484ffa0b6 319/372: - allowed removing (or cutting) annotations when buffer is in read-only mode., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 936389e36a 316/372: - prevented asking for annotation when trying to annotate a newline character., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 36d3729c27 339/372: - updated version number and docs., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a8762cd08a 344/372: - removed garbage at the end of an error message., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9aba6305fe 342/372: Merge pull request #109 from cage2/fix-replace-button, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate bd12129213 333/372: Merge pull request #106 from cage2/fixed-call-comment-region, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 83e81e0979 369/372: - added missing docstrings and improved a bit the old ones., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f5436b2bff 366/372: - added helper functions to manage annotation's interval and 'annotate-db-merge-annotations'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 59c52e7318 162/372: - updated documentation to reflects changes in the code, ELPA Syncer, 2022/02/04