Fix fast todo selection menu alignment

* lisp/org.el (org-fast-todo-selection): Avoid lines with just a
  closing delimiter.
This commit is contained in:
memeplex 2019-02-21 01:09:29 -03:00 committed by Nicolas Goaziou
parent 93c3d9d281
commit d6fcfc06ce
1 changed files with 3 additions and 1 deletions

View File

@ -12684,7 +12684,9 @@ 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)
;; Avoid lines with just a closing delimiter.
(not (equal (car tbl) '(:endgroup))))
(insert "\n")
(when ingroup (insert " "))
(setq cnt 0)))))