Commit cb639b8f authored by Kim F. Storm's avatar Kim F. Storm

(coordinates_in_window): Relax check for cursor

on vertial border between mode lines.
(Fset_window_fringes): Do not allow negative widths.
(Fset_window_scroll_bars): Likewise.
parent 37e34af7
...@@ -607,9 +607,6 @@ coordinates_in_window (w, x, y) ...@@ -607,9 +607,6 @@ coordinates_in_window (w, x, y)
int grabbable_width = ux; int grabbable_width = ux;
int lmargin_width, rmargin_width, text_left, text_right; int lmargin_width, rmargin_width, text_left, text_right;
if (*x < x0 || *x >= x1)
return ON_NOTHING;
/* In what's below, we subtract 1 when computing right_x because we /* In what's below, we subtract 1 when computing right_x because we
want the rightmost pixel, which is given by left_pixel+width-1. */ want the rightmost pixel, which is given by left_pixel+width-1. */
if (w->pseudo_window_p) if (w->pseudo_window_p)
...@@ -659,6 +656,9 @@ coordinates_in_window (w, x, y) ...@@ -659,6 +656,9 @@ coordinates_in_window (w, x, y)
return ON_VERTICAL_BORDER; return ON_VERTICAL_BORDER;
} }
if (*x < x0 || *x >= x1)
return ON_NOTHING;
/* Convert X and Y to window relative coordinates. /* Convert X and Y to window relative coordinates.
Mode line starts at left edge of window. */ Mode line starts at left edge of window. */
*x -= x0; *x -= x0;
...@@ -673,6 +673,9 @@ coordinates_in_window (w, x, y) ...@@ -673,6 +673,9 @@ coordinates_in_window (w, x, y)
goto header_vertical_border_check; goto header_vertical_border_check;
} }
if (*x < x0 || *x >= x1)
return ON_NOTHING;
/* Outside any interesting column? */ /* Outside any interesting column? */
if (*x < left_x || *x > right_x) if (*x < left_x || *x > right_x)
return ON_SCROLL_BAR; return ON_SCROLL_BAR;
...@@ -6034,9 +6037,9 @@ display marginal areas and the text area. */) ...@@ -6034,9 +6037,9 @@ display marginal areas and the text area. */)
struct window *w = decode_window (window); struct window *w = decode_window (window);
if (!NILP (left)) if (!NILP (left))
CHECK_NUMBER (left); CHECK_NATNUM (left);
if (!NILP (right)) if (!NILP (right))
CHECK_NUMBER (right); CHECK_NATNUM (right);
if (!EQ (w->left_fringe_width, left) if (!EQ (w->left_fringe_width, left)
|| !EQ (w->right_fringe_width, right) || !EQ (w->right_fringe_width, right)
...@@ -6096,7 +6099,7 @@ If TYPE is t, use the frame's scroll-bar type. */) ...@@ -6096,7 +6099,7 @@ If TYPE is t, use the frame's scroll-bar type. */)
struct window *w = decode_window (window); struct window *w = decode_window (window);
if (!NILP (width)) if (!NILP (width))
CHECK_NUMBER (width); CHECK_NATNUM (width);
if (XINT (width) == 0) if (XINT (width) == 0)
vertical_type = Qnil; vertical_type = Qnil;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment