Commit 1b3f70a0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files


Always round scroll-bar-width parameter up.
If it is nil, use 14.
parent ad9d51b2
......@@ -451,8 +451,12 @@ C-mouse-2: hide tabs"
(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)
(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)))
(defmacro ruler-mode-right-scroll-bar-cols ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment