]> git.eshelyaron.com Git - emacs.git/commitdiff
(ruler-mode-left-scroll-bar-cols):
authorRichard M. Stallman <rms@gnu.org>
Thu, 12 Sep 2002 03:21:21 +0000 (03:21 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 12 Sep 2002 03:21:21 +0000 (03:21 +0000)
Always round scroll-bar-width parameter up.
If it is nil, use 14.

lisp/ruler-mode.el

index 35c4449b58a230c693913c707ac87367d1ff6b79..4c709167100fd78105b3f6ec8f0997c2b7283ec8 100644 (file)
@@ -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)
-              (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 ()