comparison src/bidi.c @ 107624:552007beee69

Finish and debug display of invisible text. xdisp.c (handle_invisible_prop): If we are `reseat'ed, init the paragraph direction and set the `reversed_p' flag in the IT's glyph row. Fix exit conditions of the loop that skips invisible text. Update IT->prev_stop after skipping invisible text. Check for additional overlays at IT->stop_charpos, not at start_pos. Clean up the mess with setting the glyph row reversed_p flag. dispnew.c (prepare_desired_row): Preserve the reversed_p flag. bidi.c (bidi_cache_find): Use bidi_copy_it instead of copying the whole struct (which includes uninitialized parts). (bidi_init_it): Don't initialize bidi_it->paragraph_dir. xdisp.c (display_line): Remove misplaced setting of row->reversed_p flags. Copy the reversed_p flag to the next glyph row. (next_element_from_buffer): Check bidi_it.paragraph_dir rather than level_stack[0].level. Reset the reversed_p flag for non-R2L paragraphs.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 25 Jan 2010 12:29:38 -0500
parents 297c59e52ecf
children 6e29ba4351e0
comparison
equal deleted inserted replaced
107623:86c10cac941a 107624:552007beee69
713 713
714 if (i >= 0) 714 if (i >= 0)
715 { 715 {
716 bidi_dir_t current_scan_dir = bidi_it->scan_dir; 716 bidi_dir_t current_scan_dir = bidi_it->scan_dir;
717 717
718 *bidi_it = bidi_cache[i]; 718 bidi_copy_it (bidi_it, &bidi_cache[i]);
719 bidi_cache_last_idx = i; 719 bidi_cache_last_idx = i;
720 /* Don't let scan direction from from the cached state override 720 /* Don't let scan direction from from the cached state override
721 the current scan direction. */ 721 the current scan direction. */
722 bidi_it->scan_dir = current_scan_dir; 722 bidi_it->scan_dir = current_scan_dir;
723 return bidi_it->type; 723 return bidi_it->type;
969 bidi_it->bytepos = bytepos; 969 bidi_it->bytepos = bytepos;
970 bidi_it->first_elt = 1; 970 bidi_it->first_elt = 1;
971 bidi_set_paragraph_end (bidi_it); 971 bidi_set_paragraph_end (bidi_it);
972 bidi_it->new_paragraph = 1; 972 bidi_it->new_paragraph = 1;
973 bidi_it->separator_limit = -1; 973 bidi_it->separator_limit = -1;
974 bidi_it->paragraph_dir = NEUTRAL_DIR;
975 bidi_it->type = NEUTRAL_B; 974 bidi_it->type = NEUTRAL_B;
976 bidi_it->type_after_w1 = UNKNOWN_BT; 975 bidi_it->type_after_w1 = UNKNOWN_BT;
977 bidi_it->orig_type = UNKNOWN_BT; 976 bidi_it->orig_type = UNKNOWN_BT;
978 bidi_it->prev_was_pdf = 0; 977 bidi_it->prev_was_pdf = 0;
979 bidi_it->prev.type = bidi_it->prev.type_after_w1 = UNKNOWN_BT; 978 bidi_it->prev.type = bidi_it->prev.type_after_w1 = UNKNOWN_BT;