From 18bb9e21f3a95114d34947283e76a973692b526c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 23 Jun 2013 15:23:49 +0200 Subject: [PATCH] lisp/emacs-lisp/tabulated-list.el: Fix alignment problem with :pad-right = 0. (tabulated-list-init-header): Don't skip aligning the next header field when padding is 0; otherwise, field width is not respected unless the title is as wide as the field. --- lisp/ChangeLog | 7 +++++++ lisp/emacs-lisp/tabulated-list.el | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d69ca18dfa..1c4846e9002 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-06-23 Juanma Barranquero + + * emacs-lisp/tabulated-list.el (tabulated-list-init-header): + Don't skip aligning the next header field when padding is 0; + otherwise, field width is not respected unless the title is as + wide as the field. + 2013-06-22 Stefan Monnier * emacs-lisp/package.el (package-el-version): Remove. diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 6119cc80835..9c5115bcd7b 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -230,7 +230,7 @@ If ADVANCE is non-nil, move forward by one line afterwards." `(space :align-to ,(+ x shift))) (cdr cols)))) (setq x (+ x shift))))) - (if (> pad-right 0) + (if (>= pad-right 0) (push (propertize " " 'display `(space :align-to ,next-x) 'face 'fixed-pitch) -- 2.39.2