aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.bidi12
-rw-r--r--src/bidi.c3
-rw-r--r--src/xdisp.c28
3 files changed, 40 insertions, 3 deletions
diff --git a/src/ChangeLog.bidi b/src/ChangeLog.bidi
index eab5642cb14..c36ab231fa8 100644
--- a/src/ChangeLog.bidi
+++ b/src/ChangeLog.bidi
@@ -1,3 +1,15 @@
12009-08-29 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (set_cursor_from_row): Don't assume glyph->charpos
4 increments linearly.
5 (try_window_reusing_current_matrix): Don't assume glyph->charpos
6 increments linearly.
7
82009-08-28 Eli Zaretskii <eliz@gnu.org>
9
10 * bidi.c <bidi_overriding_paragraph_direction>: Default to L2R,
11 for now.
12
12009-08-22 Eli Zaretskii <eliz@gnu.org> 132009-08-22 Eli Zaretskii <eliz@gnu.org>
2 14
3 * bidi.c (bidi_initialize): staticpro bidi_char_table. 15 * bidi.c (bidi_initialize): staticpro bidi_char_table.
diff --git a/src/bidi.c b/src/bidi.c
index 697909ae8be..e558b732f40 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -155,7 +155,8 @@ typedef enum {
155 155
156int bidi_ignore_explicit_marks_for_paragraph_level = 1; 156int bidi_ignore_explicit_marks_for_paragraph_level = 1;
157 157
158bidi_dir_t bidi_overriding_paragraph_direction = NEUTRAL_DIR; 158/* FIXME: Should be user-definable. */
159bidi_dir_t bidi_overriding_paragraph_direction = L2R;
159 160
160/* FIXME: Unused? */ 161/* FIXME: Unused? */
161#define ASCII_BIDI_TYPE_SET(STR, TYPE) \ 162#define ASCII_BIDI_TYPE_SET(STR, TYPE) \
diff --git a/src/xdisp.c b/src/xdisp.c
index bd9300a40a2..54ac640da64 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12377,7 +12377,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
12377 while (glyph < end 12377 while (glyph < end
12378 && !INTEGERP (glyph->object) 12378 && !INTEGERP (glyph->object)
12379 && (!BUFFERP (glyph->object) 12379 && (!BUFFERP (glyph->object)
12380 || (last_pos = glyph->charpos) < pt_old 12380 || (last_pos = glyph->charpos) != pt_old
12381 || glyph->avoid_cursor_p)) 12381 || glyph->avoid_cursor_p))
12382 { 12382 {
12383 if (! STRINGP (glyph->object)) 12383 if (! STRINGP (glyph->object))
@@ -14497,15 +14497,39 @@ try_window_reusing_current_matrix (w)
14497 { 14497 {
14498 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; 14498 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
14499 struct glyph *end = glyph + row->used[TEXT_AREA]; 14499 struct glyph *end = glyph + row->used[TEXT_AREA];
14500 struct glyph *orig_glyph = glyph;
14501 struct cursor_pos orig_cursor = w->cursor;
14500 14502
14501 for (; glyph < end 14503 for (; glyph < end
14502 && (!BUFFERP (glyph->object) 14504 && (!BUFFERP (glyph->object)
14503 || glyph->charpos < PT); 14505 || glyph->charpos != PT);
14504 glyph++) 14506 glyph++)
14505 { 14507 {
14506 w->cursor.hpos++; 14508 w->cursor.hpos++;
14507 w->cursor.x += glyph->pixel_width; 14509 w->cursor.x += glyph->pixel_width;
14508 } 14510 }
14511 /* With bidi reordering, charpos changes non-linearly
14512 with hpos, so the right glyph could be to the
14513 left. */
14514 if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering)
14515 && (!BUFFERP (glyph->object) || glyph->charpos != PT))
14516 {
14517 struct glyph *start_glyph = row->glyphs[TEXT_AREA];
14518
14519 glyph = orig_glyph - 1;
14520 orig_cursor.hpos--;
14521 orig_cursor.x -= glyph->pixel_width;
14522 for (; glyph >= start_glyph
14523 && (!BUFFERP (glyph->object)
14524 || glyph->charpos != PT);
14525 glyph--)
14526 {
14527 w->cursor.hpos--;
14528 w->cursor.x -= glyph->pixel_width;
14529 }
14530 if (BUFFERP (glyph->object) && glyph->charpos == PT)
14531 w->cursor = orig_cursor;
14532 }
14509 } 14533 }
14510 } 14534 }
14511 14535