This avoids lines with just a closing "}", which look rather ugly.
Quite similar to my previous patch for fast tag selection.

Regards
--
Carlos
From 239e0d036da94b2a950db3ad1f7e82c5ca6d8daa Mon Sep 17 00:00:00 2001
From: memeplex <carlosjosep...@gmail.com>
Date: Thu, 21 Feb 2019 01:09:29 -0300
Subject: [PATCH] Fix fast todo selection menu alignment

* lisp/org.el (org-fast-todo-selection): Avoid lines with just a
  closing delimiter.
---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index ef6e40ca9..a34211b65 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12573,7 +12573,8 @@ Returns the new TODO keyword, or nil if no state change should occur."
 	    (when (and (= cnt 0) (not ingroup)) (insert "  "))
 	    (insert "[" c "] " tg (make-string
 				   (- fwidth 4 (length tg)) ?\ ))
-	    (when (= (setq cnt (1+ cnt)) ncol)
+	    (when (and (= (setq cnt (1+ cnt)) ncol)
+		       (not (equal (car tbl) '(:endgroup))))
 	      (insert "\n")
 	      (when ingroup (insert "  "))
 	      (setq cnt 0)))))
-- 
2.20.1

Reply via email to