emacs-elpa-diffs
[Top][All Lists]
Advanced

[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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]