(make_lispy_position): Fix buffer position calculation for

mouse click or movement in fringe.
This commit is contained in:
Kim F. Storm 2005-10-10 22:54:03 +00:00
parent 74051a928f
commit 31ab1f0585
2 changed files with 3 additions and 0 deletions

View file

@ -1,5 +1,7 @@
2005-10-11 Kim F. Storm <storm@cua.dk>
* xterm.c (glyph_rect): Return 0 if position is outside text area.
* keyboard.c (make_lispy_position): Fix buffer position calculation for
mouse click or movement in fringe.

View file

@ -5096,6 +5096,7 @@ make_lispy_position (f, x, y, time)
posn = (part == ON_LEFT_FRINGE) ? Qleft_fringe : Qright_fringe;
rx = 0;
dx = wx;
wx = (part == ON_LEFT_FRINGE) ? 0 : window_box_width (w, TEXT_AREA);
if (part == ON_RIGHT_FRINGE)
dx -= (window_box_width (w, LEFT_MARGIN_AREA)
+ window_box_width (w, TEXT_AREA)