diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/ChangeLog.10 | 2 | ||||
-rw-r--r-- | src/ChangeLog.12 | 4 | ||||
-rw-r--r-- | src/w32proc.c | 7 | ||||
-rw-r--r-- | src/xdisp.c | 23 |
5 files changed, 37 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 85eb113db82..2cf21c9b4ad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2015-01-01 Eli Zaretskii <eliz@gnu.org> + + * xdisp.c (pos_visible_p): Fix up the X coordinate for + right-to-left screen lines. (Bug#19473) + +2015-01-01 Eli Zaretskii <eliz@gnu.org> + + * w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458) + 2014-12-31 Paul Eggert <eggert@cs.ucla.edu> Simplify setfattr use by assuming GNU make diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index b6646e797e3..58a67e863bf 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 @@ -2826,7 +2826,7 @@ 2006-07-21 Eli Zaretskii <eliz@gnu.org> * w32.c (convert_time): Use explicit long double constants to - ensure long double arithmetics is used throughout. + ensure long double arithmetic is used throughout. 2006-07-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> diff --git a/src/ChangeLog.12 b/src/ChangeLog.12 index 80d7460c734..60f9ea294be 100644 --- a/src/ChangeLog.12 +++ b/src/ChangeLog.12 @@ -2327,7 +2327,7 @@ 2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com> - * w32fns.c (emacs_abort): Don't do arithmetics on void pointers. + * w32fns.c (emacs_abort): Don't do arithmetic on void pointers. 2012-12-08 Eli Zaretskii <eliz@gnu.org> @@ -4716,7 +4716,7 @@ defining an XRectangle structure. * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer - arithmetics for compatibility with x64. + arithmetic for compatibility with x64. * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for compatibility with x64. diff --git a/src/w32proc.c b/src/w32proc.c index c571726d70f..297db0e0185 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -3070,7 +3070,12 @@ If successful, the new CP is returned, otherwise nil. */) DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, Sw32_get_codepage_charset, 1, 1, 0, doc: /* Return charset ID corresponding to codepage CP. -Returns nil if the codepage is not valid. */) +Returns nil if the codepage is not valid or its charset ID could +not be determined. + +Note that this function is only guaranteed to work with ANSI +codepages; most console codepages are not supported and will +yield nil. */) (Lisp_Object cp) { CHARSETINFO info; diff --git a/src/xdisp.c b/src/xdisp.c index e6bbd859fe7..b72577ea079 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1406,6 +1406,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, struct text_pos top; int visible_p = 0; struct buffer *old_buffer = NULL; + bool r2l = false; if (FRAME_INITIAL_P (XFRAME (WINDOW_FRAME (w)))) return visible_p; @@ -1691,6 +1692,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, *rowh = max (0, (min (bottom_y, it.last_visible_y) - max (top_y, window_top_y))); *vpos = it.vpos; + if (it.bidi_it.paragraph_dir == R2L) + r2l = true; } } else @@ -1720,6 +1723,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, - max (it2.current_y, WINDOW_HEADER_LINE_HEIGHT (w)))); *vpos = it2.vpos; + if (it2.bidi_it.paragraph_dir == R2L) + r2l = true; } else bidi_unshelve_cache (it2data, 1); @@ -1729,10 +1734,20 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, if (old_buffer) set_buffer_internal_1 (old_buffer); - if (visible_p && w->hscroll > 0) - *x -= - window_hscroll_limited (w, WINDOW_XFRAME (w)) - * WINDOW_FRAME_COLUMN_WIDTH (w); + if (visible_p) + { + if (w->hscroll > 0) + *x -= + window_hscroll_limited (w, WINDOW_XFRAME (w)) + * WINDOW_FRAME_COLUMN_WIDTH (w); + /* For lines in an R2L paragraph, we need to mirror the X pixel + coordinate wrt the text area. For the reasons, see the + commentary in buffer_posn_from_coords and the explanation of + the geometry used by the move_it_* functions at the end of + the large commentary near the beginning of this file. */ + if (r2l) + *x = window_box_width (w, TEXT_AREA) - *x - 1; + } #if 0 /* Debugging code. */ |