diff options
| author | Gerd Moellmann | 2000-05-03 19:48:35 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-05-03 19:48:35 +0000 |
| commit | a21a394398aebd999207a103b3b47f2045eb07fd (patch) | |
| tree | cf74515e239963972714aa31b1f2cc75a04a18b3 /src | |
| parent | 85d0e9edbc501f38a625b9326edcc7d12acd457c (diff) | |
| download | emacs-a21a394398aebd999207a103b3b47f2045eb07fd.tar.gz emacs-a21a394398aebd999207a103b3b47f2045eb07fd.zip | |
(handle_single_display_prop): If display property value
is invalid, or something not supported on the frame, restore
iterator's position to what it was initially. Make sure to return
0 for invalid and unsupported property values.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 2f766bf46e8..f377a9b61d6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2439,7 +2439,6 @@ handle_single_display_prop (it, prop, object, position) | |||
| 2439 | 2439 | ||
| 2440 | /* Characters having this form of property are not displayed, so | 2440 | /* Characters having this form of property are not displayed, so |
| 2441 | we have to find the end of the property. */ | 2441 | we have to find the end of the property. */ |
| 2442 | space_or_image_found_p = 1; | ||
| 2443 | start_pos = *position; | 2442 | start_pos = *position; |
| 2444 | *position = display_prop_end (it, object, start_pos); | 2443 | *position = display_prop_end (it, object, start_pos); |
| 2445 | value = Qnil; | 2444 | value = Qnil; |
| @@ -2489,6 +2488,8 @@ handle_single_display_prop (it, prop, object, position) | |||
| 2489 | || NILP (location)) | 2488 | || NILP (location)) |
| 2490 | && valid_p) | 2489 | && valid_p) |
| 2491 | { | 2490 | { |
| 2491 | space_or_image_found_p = 1; | ||
| 2492 | |||
| 2492 | /* Save current settings of IT so that we can restore them | 2493 | /* Save current settings of IT so that we can restore them |
| 2493 | when we are finished with the glyph property value. */ | 2494 | when we are finished with the glyph property value. */ |
| 2494 | push_it (it); | 2495 | push_it (it); |
| @@ -2534,6 +2535,10 @@ handle_single_display_prop (it, prop, object, position) | |||
| 2534 | } | 2535 | } |
| 2535 | #endif /* HAVE_WINDOW_SYSTEM */ | 2536 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 2536 | } | 2537 | } |
| 2538 | else | ||
| 2539 | /* Invalid property or property not supported. Restore | ||
| 2540 | the position to what it was before. */ | ||
| 2541 | *position = start_pos; | ||
| 2537 | } | 2542 | } |
| 2538 | 2543 | ||
| 2539 | return space_or_image_found_p; | 2544 | return space_or_image_found_p; |