emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117446: Fix bug #18277 with mouse clicks on R2L


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r117446: Fix bug #18277 with mouse clicks on R2L lines.
Date: Sun, 17 Aug 2014 14:34:59 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117446
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18277
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-08-17 17:34:05 +0300
message:
  Fix bug #18277 with mouse clicks on R2L lines.
  
   src/dispnew.c (buffer_posn_from_coords): Fix mirroring of X
   coordinate for hscrolled R2L screen lines.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispnew.c                  dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-08-11 15:25:08 +0000
+++ b/src/ChangeLog     2014-08-17 14:34:05 +0000
@@ -1,3 +1,8 @@
+2014-08-17  Eli Zaretskii  <address@hidden>
+
+       * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
+       coordinate for hscrolled R2L screen lines.  (Bug#18277)
+
 2014-08-11  Ken Brown  <address@hidden>
 
        * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2014-07-27 06:32:56 +0000
+++ b/src/dispnew.c     2014-08-17 14:34:05 +0000
@@ -5129,9 +5129,8 @@
   move_it_to (&it, -1, 0, *y, -1, MOVE_TO_X | MOVE_TO_Y);
 
   /* TO_X is the pixel position that the iterator will compute for the
-     glyph at *X.  We add it.first_visible_x because iterator
-     positions include the hscroll.  */
-  to_x = x0 + it.first_visible_x;
+     glyph at *X.  */
+  to_x = x0;
   if (it.bidi_it.paragraph_dir == R2L)
     /* For lines in an R2L paragraph, we need to mirror TO_X wrt the
        text area.  This is because the iterator, even in R2L
@@ -5145,6 +5144,10 @@
        it should be mirrored into zero pixel position.)  */
     to_x = window_box_width (w, TEXT_AREA) - to_x - 1;
 
+  /* We need to add it.first_visible_x because iterator positions
+     include the hscroll. */
+  to_x += it.first_visible_x;
+
   /* Now move horizontally in the row to the glyph under *X.  Second
      argument is ZV to prevent move_it_in_display_line from matching
      based on buffer positions.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]