(ruler-mode-left-scroll-bar-cols):
Always round scroll-bar-width parameter up. If it is nil, use 14.
This commit is contained in:
parent
ad9d51b211
commit
1b3f70a03a
1 changed files with 6 additions and 2 deletions
|
@ -451,8 +451,12 @@ C-mouse-2: hide tabs"
|
||||||
(defmacro ruler-mode-left-scroll-bar-cols ()
|
(defmacro ruler-mode-left-scroll-bar-cols ()
|
||||||
"Return the width, measured in columns, of the left vertical scrollbar."
|
"Return the width, measured in columns, of the left vertical scrollbar."
|
||||||
'(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left)
|
'(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)))
|
||||||
(frame-char-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))
|
0))
|
||||||
|
|
||||||
(defmacro ruler-mode-right-scroll-bar-cols ()
|
(defmacro ruler-mode-right-scroll-bar-cols ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue