diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-12-05 22:49:00 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-12-05 22:49:00 +0000 |
commit | 61aaa65c4fc1b0adff20e5d9af9179bcc0a5e521 (patch) | |
tree | 43887db6b9e5ecacb5708aee3470957fb14b051f /src | |
parent | 14ad517e65742c2c1e7c0f3e93bfb835d3c177d6 (diff) | |
download | emacs-61aaa65c4fc1b0adff20e5d9af9179bcc0a5e521.tar.gz |
* xdisp.c (push_display_prop): Don't set avoid_cursor_p. Return 0
if push failed.
(handle_line_prefix): Set avoid_cursor_p here. Check return value
of push_display_prop (Bug#5000).
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/xdisp.c | 18 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5b88b3d89b0..316e5804ffd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2009-12-05 Chong Yidong <cyd@stupidchicken.com> + * xdisp.c (push_display_prop): Don't set avoid_cursor_p. Return 0 + if push failed. + (handle_line_prefix): Set avoid_cursor_p here. Check return value + of push_display_prop (Bug#5000). + * xfaces.c (Fx_family_fonts): Handle 2009-07-14 change to return value of font_list_entities (Bug#5085). diff --git a/src/xdisp.c b/src/xdisp.c index 05bcd136865..449d42dcf17 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16384,22 +16384,20 @@ cursor_row_p (w, row) /* Push the display property PROP so that it will be rendered at the - current position in IT. */ + current position in IT. Return 1 if PROP was successfully pushed, + 0 otherwise. */ -static void +static int push_display_prop (struct it *it, Lisp_Object prop) { push_it (it); - /* Never display a cursor on the prefix. */ - it->avoid_cursor_p = 1; - if (STRINGP (prop)) { if (SCHARS (prop) == 0) { pop_it (it); - return; + return 0; } it->string = prop; @@ -16426,8 +16424,10 @@ push_display_prop (struct it *it, Lisp_Object prop) else { pop_it (it); /* bogus display property, give up */ - return; + return 0; } + + return 1; } /* Return the character-property PROP at the current position in IT. */ @@ -16467,13 +16467,13 @@ handle_line_prefix (struct it *it) if (NILP (prefix)) prefix = Vline_prefix; } - if (! NILP (prefix)) + if (! NILP (prefix) && push_display_prop (it, prefix)) { - push_display_prop (it, prefix); /* If the prefix is wider than the window, and we try to wrap it, it would acquire its own wrap prefix, and so on till the iterator stack overflows. So, don't wrap the prefix. */ it->line_wrap = TRUNCATE; + it->avoid_cursor_p = 1; } } |