[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate e1cafc819b 101/372: - removed newlines in snippet
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate e1cafc819b 101/372: - removed newlines in snippet text; |
Date: |
Fri, 4 Feb 2022 16:58:22 -0500 (EST) |
branch: elpa/annotate
commit e1cafc819be12e955596cd6466f131ef46ae676f
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- removed newlines in snippet text;
- fixed wrapping of snipped text even when the latter is trunxated;
- take into account for very small windows when text snippet is built.
---
annotate.el | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/annotate.el b/annotate.el
index 919e4a45f3..5c6967e136 100644
--- a/annotate.el
+++ b/annotate.el
@@ -965,25 +965,27 @@ essentially what you get from:
"Show a summary of all the annotations in a temp buffer"
(interactive)
(cl-labels ((ellipsize (text prefix-string)
- (let ((prefix-length (string-width prefix-string))
- (ellipse-length (string-width
annotate-ellipse-text-marker)))
+ (let* ((prefix-length (string-width prefix-string))
+ (ellipse-length (string-width
annotate-ellipse-text-marker))
+ (substring-limit (max 0
+ (- (window-body-width)
+ prefix-length
+ ellipse-length
+ 2)))) ; this is for
quotation marks
(if (> (string-width text)
(+ (window-body-width)
prefix-length
- ellipse-length))
- (concat (substring text
- 0
- (- (window-body-width)
- prefix-length
- ellipse-length))
+ ellipse-length
+ 2)) ; this is for quotation marks
+ (concat (substring text 0 substring-limit)
annotate-ellipse-text-marker)
text)))
(wrap (text)
(concat "\"" text "\""))
(insert-item-summary (snippet-text button-text)
(insert
annotate-summary-list-prefix-snippet)
- (insert (ellipsize (wrap snippet-text)
-
annotate-summary-list-prefix-snippet))
+ (insert (wrap (ellipsize snippet-text
+
annotate-summary-list-prefix-snippet)))
(insert "\n")
(insert annotate-summary-list-prefix)
(insert-button (propertize (ellipsize
button-text
@@ -1001,7 +1003,11 @@ essentially what you get from:
nil
(1- annotation-begin)
(1- annotation-end))
- (buffer-string))))
+ (save-match-data
+ (replace-regexp-in-string "[\r\n]"
+ " "
+ (buffer-string))))))
+
(with-current-buffer-window
"*annotations*" nil nil
(display-buffer "*annotations*")
- [nongnu] elpa/annotate 475cc56ec6 079/372: - added checksum for files to check if annotations could be updated;, (continued)
- [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
- [nongnu] elpa/annotate e2840072db 032/372: undo last change, didn't fix warning, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1cafc819b 101/372: - removed newlines in snippet text;,
ELPA Syncer <=
- [nongnu] elpa/annotate 74699a2a70 102/372: - making loading multiple time this mode with no effect on the buffer, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d60feb9cab 106/372: Merge pull request #45 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c5ecb3649b 127/372: - removed useless quotation mark., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate db489ad5c0 111/372: - changed secondary color., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4f9c5f6d67 125/372: - added a warning when searching for a annotated text fails., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 01373a4420 104/372: - preventing loss of undo list, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3108c44c53 123/372: - moving some args checks from 'annotate-create-annotation' to, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1c64e46ad0 109/372: - changed variable name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d46d5afd34 122/372: - made two arguments of annotate-create-annotation non optional;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b180248ddc 113/372: - fixed bug with multiline annotation, ELPA Syncer, 2022/02/04