diff src/dispnew.c @ 109896:f29ba15f9d49

Fix last change in buffer_posn_from_coords for text terminals. dispnew.c (buffer_posn_from_coords): Add one-character offset for R2L lines.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 20 Aug 2010 23:55:09 +0300
parents 43a4dcd16d73
children c2d849aa4021
line wrap: on
line diff
--- a/src/dispnew.c	Fri Aug 20 23:26:12 2010 +0300
+++ b/src/dispnew.c	Fri Aug 20 23:55:09 2010 +0300
@@ -5402,7 +5402,10 @@
        iterator doesn't know about that.)  The following line adjusts
        the pixel position to the iterator geometry, which is what
        move_it_* routines use.  */
-    to_x = window_box_width (w, TEXT_AREA) - to_x;
+    to_x = window_box_width (w, TEXT_AREA) - to_x
+	   /* Text terminals need a one-character offset to get it right.  */
+	   - (FRAME_MSDOS_P (WINDOW_XFRAME (w))
+	      || FRAME_TERMCAP_P (WINDOW_XFRAME (w)));
 
   /* Now move horizontally in the row to the glyph under *X. */
   move_it_in_display_line (&it, ZV, to_x, MOVE_TO_X);