# HG changeset patch # User Eli Zaretskii # Date 1282338096 -10800 # Node ID 122c10d82ea0ae51b24f5188174ea7d610e2253c # Parent d25d7331458444fdae90ca3afcc4030c2e88b0ca# Parent f29ba15f9d4907d634e1d9875002481bc34bbe36 Fix last change in buffer_posn_from_coords for text terminals. dispnew.c (buffer_posn_from_coords): Add one-character offset for R2L lines. diff -r d25d73314584 -r 122c10d82ea0 src/ChangeLog --- a/src/ChangeLog Fri Aug 20 23:28:39 2010 +0300 +++ b/src/ChangeLog Sat Aug 21 00:01:36 2010 +0300 @@ -1,5 +1,8 @@ 2010-08-20 Eli Zaretskii + * dispnew.c (buffer_posn_from_coords): Fix last change for text + terminals: add one-character offset for R2L lines. + * emacs.c : Add a comment regarding msdos/mainmake.v2's dependency on the syntax of this declaration. diff -r d25d73314584 -r 122c10d82ea0 src/dispnew.c --- a/src/dispnew.c Fri Aug 20 23:28:39 2010 +0300 +++ b/src/dispnew.c Sat Aug 21 00:01:36 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);