diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-12-15 18:48:23 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-12-15 18:48:23 +0000 |
commit | 0a26b136cd6b721be4270edba5b52dbd712a2665 (patch) | |
tree | 8c4236bd07e632cb1adad92858243426e52e6b12 /src/xfns.c | |
parent | e9286904effac040c230b830964189e473c3f66c (diff) | |
download | emacs-0a26b136cd6b721be4270edba5b52dbd712a2665.tar.gz |
(x_set_scroll_bar_width): Reject a width that's too small.
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c index ee63ba5f44f..169a47e4b81 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1983,6 +1983,10 @@ x_set_scroll_bar_width (f, arg, oldval) && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f)) { int wid = FONT_WIDTH (f->output_data.x->font); + + if (XFASTINT (arg) < 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM) + Fsignal (Qargs_out_of_range, Fcons (arg, Qnil)); + FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg); FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid; if (FRAME_X_WINDOW (f)) |