[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 9616c55812 057/372: fix for annotations ending on
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 9616c55812 057/372: fix for annotations ending on an empty line |
Date: |
Fri, 4 Feb 2022 16:58:18 -0500 (EST) |
branch: elpa/annotate
commit 9616c55812c4b6f11365e0f4e90f9357c95280ff
Author: Bastian Bechtold <basti@bastibe.de>
Commit: Bastian Bechtold <basti@bastibe.de>
fix for annotations ending on an empty line
annotations are saved in overlays, and overlays are searched within the
current line. If the line is empty, no overlays can be found. This
special-cases the search to include the previous character in the search
if the current line is empty.
fixes #23
---
README.md | 3 +++
annotate.el | 11 ++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 271f6d8e75..b0b5d1731d 100644
--- a/README.md
+++ b/README.md
@@ -84,3 +84,6 @@ This package is released under the MIT license.
- **2016-08-25 V0.4.5 Bastian Bechtold**
Bugfix release for unicode annotations and multiline annotations.
+
+- **2016-09-07 V0.4.6 Bastian Bechtold**
+ Bugfix release for annotations ending on an empty line.
diff --git a/annotate.el b/annotate.el
index d90cbcdc71..42ad579947 100644
--- a/annotate.el
+++ b/annotate.el
@@ -5,7 +5,7 @@
;; Maintainer: Bastian Bechtold
;; URL: https://github.com/bastibe/annotate.el
;; Created: 2015-06-10
-;; Version: 0.4.5
+;; Version: 0.4.6
;; This file is NOT part of GNU Emacs.
@@ -442,13 +442,18 @@ annotation plus the newline."
(text "")
(bol (progn (beginning-of-line) (point)))
(eol (progn (end-of-line) (point)))
- (overlays (sort (overlays-in bol eol)
+ ;; include line break if on empty line:
+ (bol* (if (= bol eol) (1- bol) bol))
+ (overlays (sort (overlays-in bol* eol)
(lambda (x y)
(< (overlay-end x) (overlay-end y))))))
;; put each annotation on its own line
(dolist (ov overlays)
(if (overlay-get ov 'annotation)
- (dolist (l (save-match-data (split-string (annotate-lineate
(overlay-get ov 'annotation) (- eol bol)) "\n")))
+ (dolist (l (save-match-data
+ (split-string
+ (annotate-lineate (overlay-get ov 'annotation)
+ (- eol bol)) "\n")))
(setq text
(concat text prefix
(propertize l 'face 'annotate-annotation)
- [nongnu] elpa/annotate f65d10ac99 008/372: improve faces, (continued)
- [nongnu] elpa/annotate f65d10ac99 008/372: improve faces, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f31eddb523 044/372: fixed bug with annotation on bol, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 32e7d85fa2 039/372: don't save files with no annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e45381249f 046/372: fix bug that sometimes hid newlines, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f1ca2b15a3 043/372: add changelog to README, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 832091a37d 040/372: don't save duplicate annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a169038431 050/372: new export option, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1206a8965 068/372: - fixed a bug that made 'annotate-export-annotations' fails when the, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate dedbd9e5d5 064/372: removes unnecessary autoloads, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c9ba9d82f2 041/372: strip properties whenever file name is used, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9616c55812 057/372: fix for annotations ending on an empty line,
ELPA Syncer <=
- [nongnu] elpa/annotate 09d0cd89e4 066/372: Merge pull request #41 from conao3/change-save-file-path, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 475cc56ec6 079/372: - added checksum for files to check if annotations could be updated;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8937294206 083/372: - better naming a function., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a1c55fc98a 085/372: - added more docstrings., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 64bf3dfc8f 089/372: Merge pull request #43 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 7908f0b114 092/372: - renamed function 'annotate-start-annotation-dump' to, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a572602101 094/372: - use 'window-body-width' to truncate the string with an ellipse in a, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 067fe860ea 054/372: added word wrap for long annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3c4da9d71a 093/372: - renamed 'annotate-text-annotation-dump' to 'annotate-text-of-annotation'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 5af5e4139b 099/372: - fixed argument of check for file format version., ELPA Syncer, 2022/02/04