diff options
| author | Eli Zaretskii | 2010-01-02 10:57:35 -0500 |
|---|---|---|
| committer | Eli Zaretskii | 2010-01-02 10:57:35 -0500 |
| commit | 241ab1c185285abf1faff9596cbbbc880519dccb (patch) | |
| tree | e2cfad0d846aab9c505006bcd8ee058f4f53b1b7 /src/dispextern.h | |
| parent | c4810d2f26b64517c8fefe9e30b296ca41e3f8bc (diff) | |
| download | emacs-241ab1c185285abf1faff9596cbbbc880519dccb.tar.gz emacs-241ab1c185285abf1faff9596cbbbc880519dccb.zip | |
Continue working on handling of properties in bidi iteration.
Region display and extension seems to work.
Solved a crash in bidirectional display of etc/HELLO.
(HELLO display still not 100% OK, e.g. near Kannada.)
.gdbinit (pitx): Display some bidi information about the
iterator.
dispextern.h (BIDI_AT_BASE_LEVEL): Enclose definition in
parentheses.
xdisp.c (handle_stop_backwards): Save and restore it->current
and it->position, instead of expecting the caller to do that.
(next_element_from_buffer): When moving across stop_charpos,
record it in prev_stop. When IT_CHARPOS backs up, call
handle_stop_backwards only if above the base embedding level.
This solves the crash while displaying etc/HELLO in bidi mode.
Diffstat (limited to 'src/dispextern.h')
| -rw-r--r-- | src/dispextern.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 510ffe50dab..0521a062351 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1812,7 +1812,7 @@ struct bidi_it { | |||
| 1812 | /* Value is non-zero when the bidi iterator is at base paragraph | 1812 | /* Value is non-zero when the bidi iterator is at base paragraph |
| 1813 | embedding level. */ | 1813 | embedding level. */ |
| 1814 | #define BIDI_AT_BASE_LEVEL(BIDI_IT) \ | 1814 | #define BIDI_AT_BASE_LEVEL(BIDI_IT) \ |
| 1815 | (BIDI_IT).resolved_level == (BIDI_IT).level_stack[0].level | 1815 | ((BIDI_IT).resolved_level == (BIDI_IT).level_stack[0].level) |
| 1816 | 1816 | ||
| 1817 | 1817 | ||
| 1818 | /*********************************************************************** | 1818 | /*********************************************************************** |
| @@ -2013,10 +2013,11 @@ struct it | |||
| 2013 | EMACS_INT stop_charpos; | 2013 | EMACS_INT stop_charpos; |
| 2014 | 2014 | ||
| 2015 | /* Previous stop position, i.e. the last one before the current | 2015 | /* Previous stop position, i.e. the last one before the current |
| 2016 | buffer position. */ | 2016 | iterator position in `current'. */ |
| 2017 | EMACS_INT prev_stop; | 2017 | EMACS_INT prev_stop; |
| 2018 | 2018 | ||
| 2019 | /* Last stop_pos at the current paragraph's embedding level. */ | 2019 | /* Last stop position iterated across whose embedding level is equal |
| 2020 | to the current paragraph's embedding level. */ | ||
| 2020 | EMACS_INT base_level_stop; | 2021 | EMACS_INT base_level_stop; |
| 2021 | 2022 | ||
| 2022 | /* Maximum string or buffer position + 1. ZV when iterating over | 2023 | /* Maximum string or buffer position + 1. ZV when iterating over |