Mercurial > emacs
changeset 47425:525668986222
(ruler-mode-left-scroll-bar-cols):
Always round scroll-bar-width parameter up.
If it is nil, use 14.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 12 Sep 2002 03:21:21 +0000 |
parents | 472a93499802 |
children | ec3123180ac5 |
files | lisp/ruler-mode.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ruler-mode.el Thu Sep 12 03:19:25 2002 +0000 +++ b/lisp/ruler-mode.el Thu Sep 12 03:21:21 2002 +0000 @@ -451,8 +451,12 @@ (defmacro ruler-mode-left-scroll-bar-cols () "Return the width, measured in columns, of the left vertical scrollbar." '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left) - (round (or (frame-parameter nil 'scroll-bar-width) 0) - (frame-char-width)) + (let ((sbw (frame-parameter nil 'scroll-bar-width))) + ;; nil means it's a non-toolkit scroll bar, + ;; and its width in columns is 14 pixels rounded up. + (unless sbw (setq sbw 14)) + ;; Always round up to multiple of columns. + (ceiling sbw (frame-char-width))) 0)) (defmacro ruler-mode-right-scroll-bar-cols ()