From: Richard M. Stallman Date: Sun, 15 Dec 1996 18:48:23 +0000 (+0000) Subject: (x_set_scroll_bar_width): Reject a width that's too small. X-Git-Tag: emacs-20.1~3262 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a26b136cd6b721be4270edba5b52dbd712a2665;p=emacs.git (x_set_scroll_bar_width): Reject a width that's too small. --- 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))