From e2f2f6b9e869e8cf2714b35d5645fbbbcf2975de Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 26 Sep 2022 13:28:30 +0200 Subject: [PATCH] Fix percentage width computation in vtable * lisp/emacs-lisp/vtable.el (vtable--compute-width): Fix percentage computation (bug#58067). --- lisp/emacs-lisp/vtable.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el index 61265c97c28..9bdf90bf1d6 100644 --- a/lisp/emacs-lisp/vtable.el +++ b/lisp/emacs-lisp/vtable.el @@ -770,7 +770,8 @@ If NEXT, do the next column." ((string-match "\\([0-9.]+\\)px" spec) (string-to-number (match-string 1 spec))) ((string-match "\\([0-9.]+\\)%" spec) - (* (string-to-number (match-string 1 spec)) (window-width nil t))) + (/ (* (string-to-number (match-string 1 spec)) (window-width nil t)) + 100)) (t (error "Invalid spec: %s" spec)))) -- 2.39.2