diff options
author | memeplex <carlosjosepita@gmail.com> | 2019-02-12 17:49:40 -0300 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-13 13:05:33 +0100 |
commit | 0b148ba7061730d3f0fb45d1080dded26a87bc3d (patch) | |
tree | 68977b42f4ba90b19359e49ee151dd366e454171 | |
parent | 8e9b8dc2eb15e6d762a384ff9d702034d9572fd7 (diff) | |
download | org-mode-0b148ba7061730d3f0fb45d1080dded26a87bc3d.tar.gz |
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.
-rw-r--r-- | lisp/org.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 09feee1..29ae051 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14614,13 +14614,14 @@ Returns the new tags string, or nil to not change the current settings." ((member tg inherited) i-face)))) (when (equal (caar tbl) :grouptags) (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 (- fwidth 4 (length tg)) ?\ )) (push (cons tg c) ntable) (when (= (cl-incf cnt) ncol) - (insert "\n") - (when (or ingroup intaggroup) (insert " ")) + (unless (memq (caar tbl) '(:endgroup :endgrouptag)) + (insert "\n") + (when (or ingroup intaggroup) (insert " "))) (setq cnt 0))))) (setq ntable (nreverse ntable)) (insert "\n") |