diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2010-05-10 21:40:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2010-05-10 21:40:26 +0300 |
| commit | ae5e04fabcf5b6099aa8e1974566cad715e535f7 (patch) | |
| tree | 91543c63413a875ce922cd16310a8af58be25f68 | |
| parent | 94ecf5dae9490427cb05c0e4c4467810997ef05b (diff) | |
| download | emacs-ae5e04fabcf5b6099aa8e1974566cad715e535f7.tar.gz | |
Fix a crash when visiting image files in bidi mode.
xdisp.c (init_iterator): Don't turn on bidi reordering in unibyte buffers.
See http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html
for the details.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c0e37f70c9c..018d4d1c418 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-05-10 Eli Zaretskii <eliz@gnu.org> + + * xdisp.c (init_iterator): Don't turn on bidi reordering in + unibyte buffers. See + http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html. + 2010-05-10 Glenn Morris <rgm@gnu.org> * Makefile.in (LIBS_SYSTEM): Set using configure, not cpp. diff --git a/src/xdisp.c b/src/xdisp.c index 1e16180f7c9..92478b8e1f9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2698,8 +2698,12 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) /* Are multibyte characters enabled in current_buffer? */ it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters); - /* Do we need to reorder bidirectional text? */ - it->bidi_p = !NILP (current_buffer->bidi_display_reordering); + /* Do we need to reorder bidirectional text? Not if this is a + unibyte buffer: all single-byte characters are by definition + strong L2R, so no reordering is needed. And bidi.c doesn't + support unibyte buffers anyway. */ + it->bidi_p + = !NILP (current_buffer->bidi_display_reordering) && it->multibyte_p; /* Non-zero if we should highlight the region. */ highlight_region_p |
