diff options
| author | Eli Zaretskii | 2014-08-17 17:58:04 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-08-17 17:58:04 +0300 |
| commit | 39125b22488ab597dd137a174700fcaab616d597 (patch) | |
| tree | d6e27136de1640cd93a821b8c010cc3b9e18f76d /src | |
| parent | 52e7a5b99f790dcc21cf84ba0ae6537ccee11efc (diff) | |
| download | emacs-39125b22488ab597dd137a174700fcaab616d597.tar.gz emacs-39125b22488ab597dd137a174700fcaab616d597.zip | |
Avoid overwriting the reversed_p flags in the glyph matrices.
Avoid overwriting the reversed_p flags in the glyph matrices when
init_iterator or start_display are called.
src/xdisp.c (init_iterator): Don't initialize the reversed_p flag of
the glyph row here.
(tool_bar_height, redisplay_tool_bar, try_window)
(try_window_reusing_current_matrix, try_window_id)
(get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
reversed_p flag of the iterator's glyph row where the glyph row
is going to be redrawn.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/xdisp.c | 15 |
2 files changed, 23 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3c10f66aaac..3d04357af59 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2014-08-17 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | Avoid overwriting the reversed_p flags in the glyph matrices when | ||
| 4 | init_iterator or start_display are called. | ||
| 5 | * xdisp.c (init_iterator): Don't initialize the reversed_p flag of | ||
| 6 | the glyph row here. | ||
| 7 | (tool_bar_height, redisplay_tool_bar, try_window) | ||
| 8 | (try_window_reusing_current_matrix, try_window_id) | ||
| 9 | (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the | ||
| 10 | reversed_p flag of the iterator's glyph row where the glyph row | ||
| 11 | is going to be redrawn. | ||
| 12 | |||
| 1 | 2014-08-16 Paul Eggert <eggert@cs.ucla.edu> | 13 | 2014-08-16 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 14 | ||
| 3 | * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local. | 15 | * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local. |
diff --git a/src/xdisp.c b/src/xdisp.c index 7553881b1f6..e7c3e922cb9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2971,10 +2971,6 @@ init_iterator (struct it *it, struct window *w, | |||
| 2971 | it->glyph_row = row; | 2971 | it->glyph_row = row; |
| 2972 | it->area = TEXT_AREA; | 2972 | it->area = TEXT_AREA; |
| 2973 | 2973 | ||
| 2974 | /* Forget any previous info about this row being reversed. */ | ||
| 2975 | if (it->glyph_row) | ||
| 2976 | it->glyph_row->reversed_p = 0; | ||
| 2977 | |||
| 2978 | /* Get the dimensions of the display area. The display area | 2974 | /* Get the dimensions of the display area. The display area |
| 2979 | consists of the visible window area plus a horizontally scrolled | 2975 | consists of the visible window area plus a horizontally scrolled |
| 2980 | part to the left of the window. All x-values are relative to the | 2976 | part to the left of the window. All x-values are relative to the |
| @@ -12294,6 +12290,7 @@ tool_bar_height (struct frame *f, int *n_rows, bool pixelwise) | |||
| 12294 | /* Initialize an iterator for iteration over | 12290 | /* Initialize an iterator for iteration over |
| 12295 | F->desired_tool_bar_string in the tool-bar window of frame F. */ | 12291 | F->desired_tool_bar_string in the tool-bar window of frame F. */ |
| 12296 | init_iterator (&it, w, -1, -1, temp_row, TOOL_BAR_FACE_ID); | 12292 | init_iterator (&it, w, -1, -1, temp_row, TOOL_BAR_FACE_ID); |
| 12293 | temp_row->reversed_p = false; | ||
| 12297 | it.first_visible_x = 0; | 12294 | it.first_visible_x = 0; |
| 12298 | it.last_visible_x = WINDOW_PIXEL_WIDTH (w); | 12295 | it.last_visible_x = WINDOW_PIXEL_WIDTH (w); |
| 12299 | reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1); | 12296 | reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1); |
| @@ -12378,6 +12375,7 @@ redisplay_tool_bar (struct frame *f) | |||
| 12378 | it.first_visible_x = 0; | 12375 | it.first_visible_x = 0; |
| 12379 | it.last_visible_x = WINDOW_PIXEL_WIDTH (w); | 12376 | it.last_visible_x = WINDOW_PIXEL_WIDTH (w); |
| 12380 | row = it.glyph_row; | 12377 | row = it.glyph_row; |
| 12378 | row->reversed_p = false; | ||
| 12381 | 12379 | ||
| 12382 | /* Build a string that represents the contents of the tool-bar. */ | 12380 | /* Build a string that represents the contents of the tool-bar. */ |
| 12383 | build_desired_tool_bar_string (f); | 12381 | build_desired_tool_bar_string (f); |
| @@ -16898,6 +16896,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags) | |||
| 16898 | 16896 | ||
| 16899 | /* Initialize iterator and info to start at POS. */ | 16897 | /* Initialize iterator and info to start at POS. */ |
| 16900 | start_display (&it, w, pos); | 16898 | start_display (&it, w, pos); |
| 16899 | it.glyph_row->reversed_p = false; | ||
| 16901 | 16900 | ||
| 16902 | /* Display all lines of W. */ | 16901 | /* Display all lines of W. */ |
| 16903 | while (it.current_y < it.last_visible_y) | 16902 | while (it.current_y < it.last_visible_y) |
| @@ -17081,6 +17080,7 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 17081 | && it.current.dpvec_index < 0) | 17080 | && it.current.dpvec_index < 0) |
| 17082 | break; | 17081 | break; |
| 17083 | 17082 | ||
| 17083 | it.glyph_row->reversed_p = false; | ||
| 17084 | if (display_line (&it)) | 17084 | if (display_line (&it)) |
| 17085 | last_text_row = it.glyph_row - 1; | 17085 | last_text_row = it.glyph_row - 1; |
| 17086 | 17086 | ||
| @@ -18101,6 +18101,11 @@ try_window_id (struct window *w) | |||
| 18101 | w->cursor.vpos = -1; | 18101 | w->cursor.vpos = -1; |
| 18102 | last_text_row = NULL; | 18102 | last_text_row = NULL; |
| 18103 | overlay_arrow_seen = 0; | 18103 | overlay_arrow_seen = 0; |
| 18104 | if (it.current_y < it.last_visible_y | ||
| 18105 | && !f->fonts_changed | ||
| 18106 | && (first_unchanged_at_end_row == NULL | ||
| 18107 | || IT_CHARPOS (it) < stop_pos)) | ||
| 18108 | it.glyph_row->reversed_p = false; | ||
| 18104 | while (it.current_y < it.last_visible_y | 18109 | while (it.current_y < it.last_visible_y |
| 18105 | && !f->fonts_changed | 18110 | && !f->fonts_changed |
| 18106 | && (first_unchanged_at_end_row == NULL | 18111 | && (first_unchanged_at_end_row == NULL |
| @@ -18810,6 +18815,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string) | |||
| 18810 | 18815 | ||
| 18811 | set_buffer_temp (buffer); | 18816 | set_buffer_temp (buffer); |
| 18812 | init_iterator (&it, w, -1, -1, &scratch_glyph_row, DEFAULT_FACE_ID); | 18817 | init_iterator (&it, w, -1, -1, &scratch_glyph_row, DEFAULT_FACE_ID); |
| 18818 | scratch_glyph_row.reversed_p = false; | ||
| 18813 | it.glyph_row->used[TEXT_AREA] = 0; | 18819 | it.glyph_row->used[TEXT_AREA] = 0; |
| 18814 | SET_TEXT_POS (it.position, 0, 0); | 18820 | SET_TEXT_POS (it.position, 0, 0); |
| 18815 | 18821 | ||
| @@ -21400,6 +21406,7 @@ display_menu_bar (struct window *w) | |||
| 21400 | clear_glyph_row (row); | 21406 | clear_glyph_row (row); |
| 21401 | row->enabled_p = true; | 21407 | row->enabled_p = true; |
| 21402 | row->full_width_p = 1; | 21408 | row->full_width_p = 1; |
| 21409 | row->reversed_p = false; | ||
| 21403 | } | 21410 | } |
| 21404 | 21411 | ||
| 21405 | /* Display all items of the menu bar. */ | 21412 | /* Display all items of the menu bar. */ |