Fix fast tag selection menu alignment
* lisp/org.el (org-fast-tag-selection): Avoid lines with just a closing delimiter. Also correctly align grouped and ungrouped tags.
This commit is contained in:
parent
8e9b8dc2eb
commit
0b148ba706
|
@ -14614,13 +14614,14 @@ Returns the new tags string, or nil to not change the current settings."
|
||||||
((member tg inherited) i-face))))
|
((member tg inherited) i-face))))
|
||||||
(when (equal (caar tbl) :grouptags)
|
(when (equal (caar tbl) :grouptags)
|
||||||
(org-add-props tg nil 'face 'org-tag-group))
|
(org-add-props tg nil 'face 'org-tag-group))
|
||||||
(when (and (zerop cnt) (not ingroup) (not intaggroup)) (insert " "))
|
(when (and (zerop cnt) (not ingroup) (not intaggroup)) (insert " "))
|
||||||
(insert "[" c "] " tg (make-string
|
(insert "[" c "] " tg (make-string
|
||||||
(- fwidth 4 (length tg)) ?\ ))
|
(- fwidth 4 (length tg)) ?\ ))
|
||||||
(push (cons tg c) ntable)
|
(push (cons tg c) ntable)
|
||||||
(when (= (cl-incf cnt) ncol)
|
(when (= (cl-incf cnt) ncol)
|
||||||
(insert "\n")
|
(unless (memq (caar tbl) '(:endgroup :endgrouptag))
|
||||||
(when (or ingroup intaggroup) (insert " "))
|
(insert "\n")
|
||||||
|
(when (or ingroup intaggroup) (insert " ")))
|
||||||
(setq cnt 0)))))
|
(setq cnt 0)))))
|
||||||
(setq ntable (nreverse ntable))
|
(setq ntable (nreverse ntable))
|
||||||
(insert "\n")
|
(insert "\n")
|
||||||
|
|
Loading…
Reference in New Issue