Commit ac431108 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(coordinates_in_window): Don't report on margin area if its width is zero.

parent edb8d73e
2002-04-17 Eli Zaretskii <eliz@is.elta.co.il>
* window.c (coordinates_in_window): Don't report on margin area
if its width is zero.
2002-04-16 Jason Rumney <jasonr@gnu.org>
* w32fns.c (Fx_file_dialog): Decode file name before using.
......
......@@ -534,6 +534,7 @@ coordinates_in_window (w, x, y)
/* The width of the area where the vertical line can be dragged.
(Between mode lines for instance. */
int grabbable_width = ux;
int lmargin_width = 0, rmargin_width = 0;
if (*x < x0 || *x >= x1)
return ON_NOTHING;
......@@ -628,9 +629,14 @@ coordinates_in_window (w, x, y)
}
else
{
if (*x <= window_box_right (w, LEFT_MARGIN_AREA))
lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
/* You can never be on a margin area if its width is zero. */
if (lmargin_width
&& *x <= window_box_right (w, LEFT_MARGIN_AREA))
part = ON_LEFT_MARGIN;
else if (*x >= window_box_left (w, RIGHT_MARGIN_AREA))
else if (rmargin_width
&& *x >= window_box_left (w, RIGHT_MARGIN_AREA))
part = ON_RIGHT_MARGIN;
else
{
......@@ -665,9 +671,15 @@ coordinates_in_window (w, x, y)
}
else
{
if (*x <= window_box_right (w, LEFT_MARGIN_AREA))
lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
/* You can never be on a margin area if its width is zero.
This is especially important for character terminals. */
if (lmargin_width
&& *x <= window_box_right (w, LEFT_MARGIN_AREA))
part = ON_LEFT_MARGIN;
else if (*x >= window_box_left (w, RIGHT_MARGIN_AREA))
else if (rmargin_width
&& *x >= window_box_left (w, RIGHT_MARGIN_AREA))
part = ON_RIGHT_MARGIN;
else
{
......
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