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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/frog-menu 73d523b 1/2: Fix some menu issues


From: Clemens Radermacher
Subject: [elpa] externals/frog-menu 73d523b 1/2: Fix some menu issues
Date: Tue, 23 Apr 2019 13:22:15 -0400 (EDT)

branch: externals/frog-menu
commit 73d523b4049be7865a73a1c4cbfc37d45463edc8
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Fix some menu issues
---
 frog-menu.el | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/frog-menu.el b/frog-menu.el
index dcc422e..882b152 100644
--- a/frog-menu.el
+++ b/frog-menu.el
@@ -293,15 +293,19 @@ Fills the buffer with a grid of FORMATTED-STRINGS 
followed by PROMPT and
 ACTIONS."
   (when formatted-strings
     (insert formatted-strings)
-    (insert "\n\n"))
-  (add-text-properties
-   (point)
-   (progn
-     (insert prompt)
-     (point))
-   '(face frog-menu-prompt-face))
-  (insert "\n")
+    (insert "\n"))
+  (unless (string-empty-p prompt)
+       (insert "\n")
+       (add-text-properties
+        (point)
+        (progn
+       (insert prompt)
+       (point))
+        '(face frog-menu-prompt-face))
+       (insert "\n"))
   (when formatted-actions
+       (when (string-empty-p prompt)
+         (insert "\n"))
     (insert formatted-actions))
   (when formatted-strings
       ;; padding for avy char
@@ -313,6 +317,10 @@ ACTIONS."
                       (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 " ")
   ;; 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]