[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 4890d2d2a2 295/372: Merge pull request #95 from c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 4890d2d2a2 295/372: Merge pull request #95 from cage2/master |
Date: |
Fri, 4 Feb 2022 16:59:09 -0500 (EST) |
branch: elpa/annotate
commit 4890d2d2a208689c6214d0e1c0a6fd034e9b4253
Merge: d4eff870d9 6415fb6111
Author: cage2 <1257703+cage2@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #95 from cage2/master
Improving visuals of margin notes
---
Changelog | 6 ++++++
NEWS.org | 7 ++++++-
annotate.el | 22 +++++++++++++---------
3 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/Changelog b/Changelog
index ed05a988b3..8312e68feb 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,9 @@
+2021-01-14 cage
+
+ * annotate.el:
+
+ - added padding also for notes placed on the margin of the window.
+
2021-01-06 cage
* annotate.el:
diff --git a/NEWS.org b/NEWS.org
index cfb3629261..f32b0dd658 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -178,7 +178,12 @@
Related to the last fix the variable ~annotate-diff-export-context~
has been removed.
-* 2021-01-06 V1.1.1 Bastian Bechtold, cage ::
+- 2021-01-06 V1.1.1 Bastian Bechtold, cage ::
This version fix an old bug that causes many types of issues with
rendering of annotations on the margin of the window.
+
+- 2021-01-06 V1.1.2 Bastian Bechtold, cage ::
+
+ This version improves visual of multilined notes placed on the
+ window margins.
diff --git a/annotate.el b/annotate.el
index 582127d439..db0fd1540f 100644
--- a/annotate.el
+++ b/annotate.el
@@ -7,7 +7,7 @@
;; Maintainer: Bastian Bechtold
;; URL: https://github.com/bastibe/annotate.el
;; Created: 2015-06-10
-;; Version: 1.1.1
+;; Version: 1.1.2
;; This file is NOT part of GNU Emacs.
@@ -58,7 +58,7 @@
;;;###autoload
(defgroup annotate nil
"Annotate files without changing them."
- :version "1.1.1"
+ :version "1.1.2"
:group 'text)
;;;###autoload
@@ -922,7 +922,7 @@ to 'maximum-width'."
(append (list prefix)
so-far))))))
(%split-words (text)
- (save-match-data (split-string text " " t))))
+ (save-match-data (split-string text "[[:space:]]" t))))
(if (< maximum-width 1)
nil
(let* ((words (%split-words text))
@@ -1007,8 +1007,8 @@ aa -> aa*
a a**
"
(let ((annotation-text (overlay-get annotation-overlay 'annotation)))
- (cl-labels ((boxify-multiline ()
- (let* ((lines (annotate--split-lines
annotation-text))
+ (cl-labels ((boxify-multiline (raw-annotation-text &optional
add-space-at-end)
+ (let* ((lines (annotate--split-lines
raw-annotation-text))
(lines-widths (mapcar 'string-width lines))
(max-width (cl-reduce (lambda (a b) (if (> a b)
a
@@ -1023,11 +1023,15 @@ a a**
(box-lines (cl-mapcar (lambda (a b) (concat a b))
lines paddings))
(almost-boxed (annotate--join-with-string box-lines
"\n")))
- (concat almost-boxed " "))))
+ (if add-space-at-end
+ (concat almost-boxed " ")
+ almost-boxed))))
(if annotation-on-is-own-line-p
- (list (boxify-multiline))
- (annotate--split-lines (annotate-lineate annotation-text
- (- end-of-line
begin-of-line)))))))
+ (list (boxify-multiline annotation-text t))
+ (let* ((lineated (annotate-lineate annotation-text
+ (- end-of-line
begin-of-line)))
+ (boxed (boxify-multiline lineated nil)))
+ (annotate--split-lines boxed))))))
(defun annotate--annotation-builder ()
"Searches the line before point for annotations, and returns a
- [nongnu] elpa/annotate bd31608f50 260/372: - added command 'annotate-summary-of-file-from-current-pos', (continued)
- [nongnu] elpa/annotate bd31608f50 260/372: - added command 'annotate-summary-of-file-from-current-pos', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a8857153ca 276/372: - extracted local function and taken into account info node names, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 12ad966a9d 278/372: - wrapped 'annotate-wrap-annotation-in-box' with 'save-match-data., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 401dab7723 291/372: - updated README, Changelog and version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 44ac24f63d 274/372: Merge pull request #87 from cage2/overwrite-annotations, ELPA Syncer, 2022/02/04
- [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 <=
- [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, 2022/02/04
- [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