From d4172c3be980b14b640da20f3ed6fa723273e735 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Oct 2011 13:17:32 +0200 Subject: [PATCH] Fix the change with paragraph_dir initialization. src/bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as some callers set that themselves. src/xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect cursor motion with and arrow keys. --- src/ChangeLog | 9 +++++++++ src/bidi.c | 1 - src/xdisp.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index cf0644ff03..e7cd83305e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2011-10-13 Eli Zaretskii + + * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize + itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect + cursor motion with and arrow keys. + + * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as + some callers set that themselves. + 2011-10-12 Eli Zaretskii * xdisp.c (find_row_edges): Handle the case where ROW comes from a diff --git a/src/bidi.c b/src/bidi.c index d6be41f47a..f06c146ca8 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -808,7 +808,6 @@ bidi_init_it (EMACS_INT charpos, EMACS_INT bytepos, int frame_window_p, bidi_it->nchars = -1; /* to be computed in bidi_resolve_explicit_1 */ bidi_it->first_elt = 1; bidi_set_paragraph_end (bidi_it); - bidi_it->paragraph_dir = NEUTRAL_DIR; bidi_it->new_paragraph = 1; bidi_it->separator_limit = -1; bidi_it->type = NEUTRAL_B; diff --git a/src/xdisp.c b/src/xdisp.c index 01472a6bb0..13bb0f79e1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19484,6 +19484,7 @@ See also `bidi-paragraph-direction'. */) bytepos--; } bidi_init_it (pos, bytepos, FRAME_WINDOW_P (SELECTED_FRAME ()), &itb); + itb.paragraph_dir = NEUTRAL_DIR; itb.string.s = NULL; itb.string.lstring = Qnil; itb.string.bufpos = 0; -- 2.20.1