[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/frog-menu 571d4bc 4/6: Improve menu formatting
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/frog-menu 571d4bc 4/6: Improve menu formatting |
Date: |
Mon, 29 Apr 2019 08:35:03 -0400 (EDT) |
branch: externals/frog-menu
commit 571d4bca9b20f13da7cf012e67f3d30130d9aee5
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Improve menu formatting
---
frog-menu.el | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/frog-menu.el b/frog-menu.el
index 34a871a..1e0a6c1 100644
--- a/frog-menu.el
+++ b/frog-menu.el
@@ -292,10 +292,9 @@ PROMPT, FORMATTED-STRINGS and FORMATTED-ACTIONS are the
args from
Fills the buffer with a grid of FORMATTED-STRINGS followed by PROMPT and
ACTIONS."
(when formatted-strings
- (insert formatted-strings)
- (insert "\n"))
+ (insert formatted-strings))
(unless (string-empty-p prompt)
- (insert "\n")
+ (insert "\n\n")
(add-text-properties
(point)
(progn
@@ -305,25 +304,8 @@ ACTIONS."
(insert "\n"))
(when formatted-actions
(when (string-empty-p prompt)
- (insert "\n"))
+ (insert "\n\n"))
(insert formatted-actions))
- (when formatted-strings
- ;; padding for avy char
- (goto-char (point-min))
- (while (not (eobp))
- (goto-char (line-end-position))
- ;; Fix: assumes only one avy char...
- (insert (concat " "
- (make-string frog-menu-min-col-padding ?\s)
- (if frog-menu-avy-padding " " "")))
- (forward-line 1)))
- ;; insert invisible char otherwise posframe hides second line when only two
- ;; strings and no prompt, no actions,
- (insert
- (propertize "_"
- 'face
- (list :foreground
- (face-background 'frog-menu-posframe-background-face nil t))))
;; posframe needs point at start,
;; otherwise it fails on first init
(goto-char (point-min)))
- [elpa] externals/frog-menu updated (6ac3c52 -> 2ef5816), Clemens Radermacher, 2019/04/29
- [elpa] externals/frog-menu 4f3eab1 3/6: Don't use blank unicode char, users might use special glyph faces, Clemens Radermacher, 2019/04/29
- [elpa] externals/frog-menu 571d4bc 4/6: Improve menu formatting,
Clemens Radermacher <=
- [elpa] externals/frog-menu 891d53f 2/6: Fix whitespace, Clemens Radermacher, 2019/04/29
- [elpa] externals/frog-menu 2ef5816 6/6: Version bump, Clemens Radermacher, 2019/04/29
- [elpa] externals/frog-menu 85e0cea 1/6: Fix width calculation to depend on frog-menu-type, Clemens Radermacher, 2019/04/29
- [elpa] externals/frog-menu 586aadf 5/6: Handle avy display differently, Clemens Radermacher, 2019/04/29