[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate b2cd959cfa 053/372: Annotations of long lines sta
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate b2cd959cfa 053/372: Annotations of long lines start at the next line |
Date: |
Fri, 4 Feb 2022 16:58:18 -0500 (EST) |
branch: elpa/annotate
commit b2cd959cfa28e93c2c29aa1b7a9a14af83cd8757
Author: Bastian Bechtold <basti@bastibe.de>
Commit: Bastian Bechtold <basti@bastibe.de>
Annotations of long lines start at the next line
fixes #27
---
annotate.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/annotate.el b/annotate.el
index bef6ddf101..7b4dae9174 100644
--- a/annotate.el
+++ b/annotate.el
@@ -404,11 +404,12 @@ annotation plus the newline."
(re-search-forward "\\(.*\\(\n\\)\\)")
t)))
-(defun annotate-lineate (text)
+(defun annotate-lineate (text line-width)
"Breaks `text` into lines to fit in the annotation space"
(let ((available-width (- (window-body-width)
annotate-annotation-column))
- (lineated "")
+ ;; if the annotation won't fit at the end of the line:
+ (lineated (if (< line-width annotate-annotation-column) "" "\n"))
(current-pos 0))
(while (< current-pos (string-width text))
(setq lineated
@@ -440,7 +441,7 @@ annotation plus the newline."
;; 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)) "\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 936389e36a 316/372: - prevented asking for annotation when trying to annotate a newline character., (continued)
- [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
- [nongnu] elpa/annotate fd9c403ecc 164/372: - changed quotation mark sentence., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a28e7b4fd2 028/372: refactored and documented export function, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b2cd959cfa 053/372: Annotations of long lines start at the next line,
ELPA Syncer <=
- [nongnu] elpa/annotate e98c93a12b 072/372: - added 'annotate-' prefix to public symbols;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6289c87bf8 029/372: annotation buffer now has proper file name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1daa61b99 065/372: use `locate-user-emacs-file` to specify default save file, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 392197f943 155/372: Merge branch 'master' into annotations-on-their-own-line, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3bb486d0cf 158/372: - changed `let*' with `let'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c007611614 159/372: - removed useless rebinding of 'annotate-annotation-position-policy'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c7891d8d24 163/372: - tried to make the file more "site friendly"., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ec0ed147a2 170/372: - fixed error for regexp search in 'annotate--font-lock-matcher', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1525550f85 182/372: - changed test for annotation rejection and removed (maybe) useless check., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2e858729cb 200/372: - saving annotations with newlines seems to works;, ELPA Syncer, 2022/02/04