From: Lars Ingebrigtsen Date: Mon, 26 Sep 2022 11:28:30 +0000 (+0200) Subject: Fix percentage width computation in vtable X-Git-Tag: emacs-29.0.90~1856^2~217 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e2f2f6b9e869e8cf2714b35d5645fbbbcf2975de;p=emacs.git Fix percentage width computation in vtable * lisp/emacs-lisp/vtable.el (vtable--compute-width): Fix percentage computation (bug#58067). --- 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))))