[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100485: Fix crash reported in bug #6
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100485: Fix crash reported in bug #6306. |
Date: |
Sun, 30 May 2010 22:01:51 +0300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100485
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2010-05-30 22:01:51 +0300
message:
Fix crash reported in bug #6306.
bidi.c (bidi_move_to_visually_next): Make sure the sentinel
state is always cached.
modified:
src/ChangeLog
src/bidi.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-05-29 12:51:01 +0000
+++ b/src/ChangeLog 2010-05-30 19:01:51 +0000
@@ -1,3 +1,8 @@
+2010-05-30 Eli Zaretskii <address@hidden>
+
+ * bidi.c (bidi_move_to_visually_next): Make sure the sentinel
+ state is always cached (bug#6306).
+
2010-05-29 Eli Zaretskii <address@hidden>
Fix cursor motion in bidi-reordered continued lines.
=== modified file 'src/bidi.c'
--- a/src/bidi.c 2010-05-22 19:32:21 +0000
+++ b/src/bidi.c 2010-05-30 19:01:51 +0000
@@ -1907,7 +1907,9 @@
if (!bidi_it->first_elt && bidi_it->orig_type == NEUTRAL_B)
bidi_line_init (bidi_it);
- /* Prepare the sentinel iterator state. */
+ /* Prepare the sentinel iterator state, and cache it. When we bump
+ into it, scanning backwards, we'll know that the last non-base
+ level is exhausted. */
if (bidi_cache_idx == 0)
{
bidi_copy_it (&sentinel, bidi_it);
@@ -1918,6 +1920,7 @@
sentinel.ch = '\n'; /* doesn't matter, but why not? */
sentinel.ch_len = 1;
}
+ bidi_cache_iterator_state (&sentinel, 1);
}
old_level = bidi_it->resolved_level;
@@ -1933,11 +1936,6 @@
int incr = ascending ? 1 : -1;
int expected_next_level = old_level + incr;
- /* If we don't have anything cached yet, we need to cache the
- sentinel state, since we'll need it to record where to jump
- when the last non-base level is exhausted. */
- if (bidi_cache_idx == 0)
- bidi_cache_iterator_state (&sentinel, 1);
/* Jump (or walk) to the other edge of this level. */
bidi_find_other_level_edge (bidi_it, level_to_search, !ascending);
/* Switch scan direction and peek at the next character in the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100485: Fix crash reported in bug #6306.,
Eli Zaretskii <=