aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-02-03 20:52:18 +0200
committerEli Zaretskii2015-02-03 20:52:18 +0200
commite589765b881e64c26b29509dd99f2dc51ad44153 (patch)
treea5d8ab0955631a682a24c514af649efbfadb32ba /src
parent4e8d586076f412b9dfe43241e455a7c76b117020 (diff)
downloademacs-e589765b881e64c26b29509dd99f2dc51ad44153.tar.gz
emacs-e589765b881e64c26b29509dd99f2dc51ad44153.zip
A more thorough fix for bug#19307
src/xdisp.c (handle_stop, handle_single_display_spec) (next-element_from_image): Don't reset the ignore_overlay_strings_at_pos_p flag here. (next_element_from_buffer): Reset ignore_overlay_strings_at_pos_p here. (next_overlay_string): Set ignore_overlay_strings_at_pos_p here, after we've exhausted all the overlay strings at the current position.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/xdisp.c26
2 files changed, 21 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6f678d481a6..8e7ab9363f6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
12015-02-03 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (handle_stop, handle_single_display_spec)
4 (next-element_from_image): Don't reset the
5 ignore_overlay_strings_at_pos_p flag here.
6 (next_element_from_buffer): Reset ignore_overlay_strings_at_pos_p
7 here.
8 (next_overlay_string): Set ignore_overlay_strings_at_pos_p here,
9 after we've exhausted all the overlay strings at the current
10 position. (Bug#19307)
11
12015-02-02 Eli Zaretskii <eliz@gnu.org> 122015-02-02 Eli Zaretskii <eliz@gnu.org>
2 13
3 * xdisp.c (set_iterator_to_next): Set value of stop_charpos 14 * xdisp.c (set_iterator_to_next): Set value of stop_charpos
diff --git a/src/xdisp.c b/src/xdisp.c
index 6a1e3ee2dc2..5e552ca2fdb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3434,7 +3434,6 @@ handle_stop (struct it *it)
3434 it->dpvec = NULL; 3434 it->dpvec = NULL;
3435 it->current.dpvec_index = -1; 3435 it->current.dpvec_index = -1;
3436 handle_overlay_change_p = !it->ignore_overlay_strings_at_pos_p; 3436 handle_overlay_change_p = !it->ignore_overlay_strings_at_pos_p;
3437 it->ignore_overlay_strings_at_pos_p = 0;
3438 it->ellipsis_p = 0; 3437 it->ellipsis_p = 0;
3439 3438
3440 /* Use face of preceding text for ellipsis (if invisible) */ 3439 /* Use face of preceding text for ellipsis (if invisible) */
@@ -3525,7 +3524,6 @@ handle_stop (struct it *it)
3525 pop_it (it); 3524 pop_it (it);
3526 else 3525 else
3527 { 3526 {
3528 it->ignore_overlay_strings_at_pos_p = true;
3529 it->string_from_display_prop_p = 0; 3527 it->string_from_display_prop_p = 0;
3530 it->from_disp_prop_p = 0; 3528 it->from_disp_prop_p = 0;
3531 handle_overlay_change_p = 0; 3529 handle_overlay_change_p = 0;
@@ -5121,11 +5119,6 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
5121 iterate_out_of_display_property (it); 5119 iterate_out_of_display_property (it);
5122 *position = it->position; 5120 *position = it->position;
5123 } 5121 }
5124 /* If we were to display this fringe bitmap,
5125 next_element_from_image would have reset this flag.
5126 Do the same, to avoid affecting overlays that
5127 follow. */
5128 it->ignore_overlay_strings_at_pos_p = 0;
5129 return 1; 5122 return 1;
5130 } 5123 }
5131 } 5124 }
@@ -5145,9 +5138,6 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
5145 iterate_out_of_display_property (it); 5138 iterate_out_of_display_property (it);
5146 *position = it->position; 5139 *position = it->position;
5147 } 5140 }
5148 if (it)
5149 /* Reset this flag like next_element_from_image would. */
5150 it->ignore_overlay_strings_at_pos_p = 0;
5151 return 1; 5141 return 1;
5152 } 5142 }
5153 5143
@@ -5640,6 +5630,12 @@ next_overlay_string (struct it *it)
5640 if (it->sp > 0 && STRINGP (it->string) && !SCHARS (it->string)) 5630 if (it->sp > 0 && STRINGP (it->string) && !SCHARS (it->string))
5641 pop_it (it); 5631 pop_it (it);
5642 5632
5633 /* Since we've exhausted overlay strings at this buffer
5634 position, set the flag to ignore overlays until we move to
5635 another position. The flag is reset in
5636 next_element_from_buffer. */
5637 it->ignore_overlay_strings_at_pos_p = true;
5638
5643 /* If we're at the end of the buffer, record that we have 5639 /* If we're at the end of the buffer, record that we have
5644 processed the overlay strings there already, so that 5640 processed the overlay strings there already, so that
5645 next_element_from_buffer doesn't try it again. */ 5641 next_element_from_buffer doesn't try it again. */
@@ -7478,10 +7474,6 @@ set_iterator_to_next (struct it *it, int reseat_p)
7478 reseat_at_next_visible_line_start (it, 1); 7474 reseat_at_next_visible_line_start (it, 1);
7479 else if (it->dpvec_char_len > 0) 7475 else if (it->dpvec_char_len > 0)
7480 { 7476 {
7481 if (it->method == GET_FROM_STRING
7482 && it->current.overlay_string_index >= 0
7483 && it->n_overlay_strings > 0)
7484 it->ignore_overlay_strings_at_pos_p = true;
7485 it->len = it->dpvec_char_len; 7477 it->len = it->dpvec_char_len;
7486 set_iterator_to_next (it, reseat_p); 7478 set_iterator_to_next (it, reseat_p);
7487 } 7479 }
@@ -8110,7 +8102,6 @@ static int
8110next_element_from_image (struct it *it) 8102next_element_from_image (struct it *it)
8111{ 8103{
8112 it->what = IT_IMAGE; 8104 it->what = IT_IMAGE;
8113 it->ignore_overlay_strings_at_pos_p = 0;
8114 return 1; 8105 return 1;
8115} 8106}
8116 8107
@@ -8280,6 +8271,7 @@ next_element_from_buffer (struct it *it)
8280 and handle the last stop_charpos that precedes our 8271 and handle the last stop_charpos that precedes our
8281 current position. */ 8272 current position. */
8282 handle_stop_backwards (it, it->stop_charpos); 8273 handle_stop_backwards (it, it->stop_charpos);
8274 it->ignore_overlay_strings_at_pos_p = false;
8283 return GET_NEXT_DISPLAY_ELEMENT (it); 8275 return GET_NEXT_DISPLAY_ELEMENT (it);
8284 } 8276 }
8285 else 8277 else
@@ -8296,6 +8288,7 @@ next_element_from_buffer (struct it *it)
8296 it->base_level_stop = it->stop_charpos; 8288 it->base_level_stop = it->stop_charpos;
8297 } 8289 }
8298 handle_stop (it); 8290 handle_stop (it);
8291 it->ignore_overlay_strings_at_pos_p = false;
8299 return GET_NEXT_DISPLAY_ELEMENT (it); 8292 return GET_NEXT_DISPLAY_ELEMENT (it);
8300 } 8293 }
8301 } 8294 }
@@ -8323,6 +8316,7 @@ next_element_from_buffer (struct it *it)
8323 } 8316 }
8324 else 8317 else
8325 handle_stop_backwards (it, it->base_level_stop); 8318 handle_stop_backwards (it, it->base_level_stop);
8319 it->ignore_overlay_strings_at_pos_p = false;
8326 return GET_NEXT_DISPLAY_ELEMENT (it); 8320 return GET_NEXT_DISPLAY_ELEMENT (it);
8327 } 8321 }
8328 else 8322 else
@@ -8334,7 +8328,7 @@ next_element_from_buffer (struct it *it)
8334 8328
8335 /* We moved to the next buffer position, so any info about 8329 /* We moved to the next buffer position, so any info about
8336 previously seen overlays is no longer valid. */ 8330 previously seen overlays is no longer valid. */
8337 it->ignore_overlay_strings_at_pos_p = 0; 8331 it->ignore_overlay_strings_at_pos_p = false;
8338 8332
8339 /* Maybe run the redisplay end trigger hook. Performance note: 8333 /* Maybe run the redisplay end trigger hook. Performance note:
8340 This doesn't seem to cost measurable time. */ 8334 This doesn't seem to cost measurable time. */