From: Kim F. Storm Date: Mon, 10 Oct 2005 22:54:03 +0000 (+0000) Subject: (make_lispy_position): Fix buffer position calculation for X-Git-Tag: emacs-pretest-22.0.90~6681 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31ab1f0585b47a6dbe54b5451e94c1ed64bf1347;p=emacs.git (make_lispy_position): Fix buffer position calculation for mouse click or movement in fringe. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6f68b6a441a..f0c9084da54 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2005-10-11 Kim F. Storm + * 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. diff --git a/src/keyboard.c b/src/keyboard.c index 3826d460e3f..1d118c7a57b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -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)