diff options
| author | Richard M. Stallman | 2002-09-12 03:21:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-12 03:21:21 +0000 |
| commit | 1b3f70a03ac7832ee8568dbb656ced3025b036f7 (patch) | |
| tree | dd3a14a1ac17892d0c7ce70521894e1ba64f581a /lisp | |
| parent | ad9d51b2115f2bfdc4c7cd87c6c8c16cff0729b5 (diff) | |
| download | emacs-1b3f70a03ac7832ee8568dbb656ced3025b036f7.tar.gz emacs-1b3f70a03ac7832ee8568dbb656ced3025b036f7.zip | |
(ruler-mode-left-scroll-bar-cols):
Always round scroll-bar-width parameter up.
If it is nil, use 14.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ruler-mode.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index 35c4449b58a..4c709167100 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el | |||
| @@ -451,8 +451,12 @@ C-mouse-2: hide tabs" | |||
| 451 | (defmacro ruler-mode-left-scroll-bar-cols () | 451 | (defmacro ruler-mode-left-scroll-bar-cols () |
| 452 | "Return the width, measured in columns, of the left vertical scrollbar." | 452 | "Return the width, measured in columns, of the left vertical scrollbar." |
| 453 | '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left) | 453 | '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left) |
| 454 | (round (or (frame-parameter nil 'scroll-bar-width) 0) | 454 | (let ((sbw (frame-parameter nil 'scroll-bar-width))) |
| 455 | (frame-char-width)) | 455 | ;; nil means it's a non-toolkit scroll bar, |
| 456 | ;; and its width in columns is 14 pixels rounded up. | ||
| 457 | (unless sbw (setq sbw 14)) | ||
| 458 | ;; Always round up to multiple of columns. | ||
| 459 | (ceiling sbw (frame-char-width))) | ||
| 456 | 0)) | 460 | 0)) |
| 457 | 461 | ||
| 458 | (defmacro ruler-mode-right-scroll-bar-cols () | 462 | (defmacro ruler-mode-right-scroll-bar-cols () |