diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-10-20 14:39:52 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-10-20 14:39:52 +0200 |
commit | b2eb5f137cc5f2ac48e677803b37e6a5709388b3 (patch) | |
tree | 30fc7595964fe170fdc33776aeb23dd5e49e4b3e /src/dispextern.h | |
parent | 3ee1e737cd69b12fda65bab1c04504b7e2231c25 (diff) | |
download | emacs-b2eb5f137cc5f2ac48e677803b37e6a5709388b3.tar.gz |
Improve the speedup of bidi display introduced in revision 106124 for bug#9771.
src/dispextern.h (struct bidi_it): New member next_en_type.
src/bidi.c (bidi_line_init): Initialize the next_en_type member.
(bidi_resolve_explicit_1): When next_en_pos is valid for the
current character, check also for next_en_type being WEAK_EN.
(bidi_resolve_weak): Don't enter the expensive loop if the current
position is before next_en_pos. Record the bidi type of the first
non-ET, non-BN character we find, in addition to its position.
(bidi_level_of_next_char): Invalidate next_en_type when
next_en_pos is over-stepped.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r-- | src/dispextern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 3c157371ef3..dd5f67d2d10 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1856,7 +1856,8 @@ struct bidi_it { struct bidi_saved_info next_for_neutral; /* surrounding characters for... */ struct bidi_saved_info prev_for_neutral; /* ...resolving neutrals */ struct bidi_saved_info next_for_ws; /* character after sequence of ws */ - EMACS_INT next_en_pos; /* position of next EN char for ET */ + EMACS_INT next_en_pos; /* pos. of next char for determining ET type */ + bidi_type_t next_en_type; /* type of char at next_en_pos */ EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ bidi_dir_t sor; /* direction of start-of-run in effect */ int scan_dir; /* direction of text scan, 1: forw, -1: back */ |