From: Eli Zaretskii Date: Fri, 20 Aug 2010 20:55:09 +0000 (+0300) Subject: Fix last change in buffer_posn_from_coords for text terminals. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~511^2~24^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b43c883c71bc3cf494b17dde69d275c73d10942e;p=emacs.git 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 --git a/src/ChangeLog b/src/ChangeLog index 5b44cc8f34c..2125f05b787 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/dispnew.c b/src/dispnew.c index efcfd101782..547ab2a4187 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5402,7 +5402,10 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p 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);