summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-06-25 14:44:30 +0300
committerEli Zaretskii <eliz@gnu.org>2011-06-25 14:44:30 +0300
commit0c22566f00ee467af8d41ef7dc9f18c3b66630c5 (patch)
tree7db72a0297d9f21e0582d94286c21cad2c64dfa9 /src/dispextern.h
parent58b9f433ad4a4ea20e0c51997ca8a9aaab79a213 (diff)
downloademacs-0c22566f00ee467af8d41ef7dc9f18c3b66630c5.tar.gz
Set up the bidi iterator for iterating display strings and overlay strings.
Not tested yet, just compiled. src/xdisp.c (handle_single_display_spec, next_overlay_string) (get_overlay_strings_1, push_display_prop): Set up the bidi iterator for displaying display or overlay strings. (forward_to_next_line_start): Don't use the shortcut if bidi-iterating. (back_to_previous_visible_line_start): If handle_display_prop pushed the iterator stack, restore the internal state of the bidi iterator by calling bidi_pop_it same number of times. (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero, and we are bidi-iterating, don't decrement the iterator position; instead, set the first_elt flag in the bidi iterator, to produce the same effect. (reseat_1): Remove redundant setting of string_from_display_prop_p. (push_display_prop): xassert that we are iterating a buffer. (push_it, pop_it): Save and restore the state of the bidi iterator. Save and restore the bidi_p flag. (pop_it): Iterate out of display property for string iteration as well. (iterate_out_of_display_property): Support iteration over strings. (handle_single_display_spec): Set up it->bidi_it for iteration over a display string, and call bidi_init_it. src/bidi.c (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE. src/dispextern.h (struct iterator_stack_entry): New member bidi_p. (struct it): Member bidi_p is now a bit field 1 bit wide.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index acd7862e5dc..d5479c7a64e 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2157,7 +2157,9 @@ struct it
Lisp_Object *dpvec, *dpend;
/* Length in bytes of the char that filled dpvec. A value of zero
- means that no such character is involved. */
+ means that no such character is involved. A negative value means
+ the rest of the line from the current iterator position onwards
+ is hidden by selective display or ellipsis. */
int dpvec_char_len;
/* Face id to use for all characters in display vector. -1 if unused. */
@@ -2253,6 +2255,7 @@ struct it
unsigned string_from_display_prop_p : 1;
unsigned display_ellipsis_p : 1;
unsigned avoid_cursor_p : 1;
+ unsigned bidi_p:1;
enum line_wrap_method line_wrap;
/* properties from display property that are reset by another display property. */
@@ -2473,7 +2476,7 @@ struct it
/* Non-zero means we need to reorder bidirectional text for display
in the visual order. */
- int bidi_p;
+ unsigned bidi_p : 1;
/* For iterating over bidirectional text. */
struct bidi_it bidi_it;