# HG changeset patch # User Chong Yidong # Date 1260053340 0 # Node ID 68f4d89d2fe9e45052b1329db335a2708048d847 # Parent a72f79f8918535b7063a755aaab84d15f856cabe * 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). diff -r a72f79f89185 -r 68f4d89d2fe9 src/ChangeLog --- a/src/ChangeLog Sat Dec 05 22:01:00 2009 +0000 +++ b/src/ChangeLog Sat Dec 05 22:49:00 2009 +0000 @@ -1,5 +1,10 @@ 2009-12-05 Chong Yidong + * 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 -r a72f79f89185 -r 68f4d89d2fe9 src/xdisp.c --- a/src/xdisp.c Sat Dec 05 22:01:00 2009 +0000 +++ b/src/xdisp.c Sat Dec 05 22:49:00 2009 +0000 @@ -16384,22 +16384,20 @@ /* Push the display property PROP so that it will be rendered at the - current position in IT. */ - -static void + current position in IT. Return 1 if PROP was successfully pushed, + 0 otherwise. */ + +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 @@ 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 @@ if (NILP (prefix)) prefix = Vline_prefix; } - if (! NILP (prefix)) - { - push_display_prop (it, prefix); + if (! NILP (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; } }