diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 27 |
2 files changed, 31 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7a652d04049..5f3e1322395 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2006-01-24 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | ||
| 2 | |||
| 3 | * xdisp.c (handle_invisible_prop): Set it->position to fix cursor | ||
| 4 | display when point moves across an ellipsis. If there are | ||
| 5 | adjacent invisible texts, don't lose the second one's ellipsis. | ||
| 6 | (x_produce_glyphs): Doc fix. | ||
| 7 | |||
| 1 | 2006-01-23 Stefan Monnier <monnier@iro.umontreal.ca> | 8 | 2006-01-23 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 9 | ||
| 3 | * xterm.c (x_catch_errors_unwind): Yet another int/Lisp_Object mixup. | 10 | * xterm.c (x_catch_errors_unwind): Yet another int/Lisp_Object mixup. |
diff --git a/src/xdisp.c b/src/xdisp.c index fa09c076467..0a038ea7e63 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3614,6 +3614,11 @@ handle_invisible_prop (it) | |||
| 3614 | skip starting with next_stop. */ | 3614 | skip starting with next_stop. */ |
| 3615 | if (invis_p) | 3615 | if (invis_p) |
| 3616 | IT_CHARPOS (*it) = next_stop; | 3616 | IT_CHARPOS (*it) = next_stop; |
| 3617 | |||
| 3618 | /* If there are adjacent invisible texts, don't lose the | ||
| 3619 | second one's ellipsis. */ | ||
| 3620 | if (invis_p == 2) | ||
| 3621 | display_ellipsis_p = 1; | ||
| 3617 | } | 3622 | } |
| 3618 | while (invis_p); | 3623 | while (invis_p); |
| 3619 | 3624 | ||
| @@ -3634,7 +3639,23 @@ handle_invisible_prop (it) | |||
| 3634 | it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p; | 3639 | it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p; |
| 3635 | } | 3640 | } |
| 3636 | else if (display_ellipsis_p) | 3641 | else if (display_ellipsis_p) |
| 3637 | setup_for_ellipsis (it, 0); | 3642 | { |
| 3643 | /* Make sure that the glyphs of the ellipsis will get | ||
| 3644 | correct `charpos' values. If we would not update | ||
| 3645 | it->position here, the glyphs would belong to the | ||
| 3646 | last visible character _before_ the invisible | ||
| 3647 | text, which confuses `set_cursor_from_row'. | ||
| 3648 | |||
| 3649 | We use the last invisible position instead of the | ||
| 3650 | first because this way the cursor is always drawn on | ||
| 3651 | the first "." of the ellipsis, whenever PT is inside | ||
| 3652 | the invisible text. Otherwise the cursor would be | ||
| 3653 | placed _after_ the ellipsis when the point is after the | ||
| 3654 | first invisible character. */ | ||
| 3655 | it->position.charpos = IT_CHARPOS (*it) - 1; | ||
| 3656 | it->position.bytepos = CHAR_TO_BYTE (it->position.charpos); | ||
| 3657 | setup_for_ellipsis (it, 0); | ||
| 3658 | } | ||
| 3638 | } | 3659 | } |
| 3639 | } | 3660 | } |
| 3640 | 3661 | ||
| @@ -19815,8 +19836,8 @@ calc_line_height_property (it, val, font, boff, override) | |||
| 19815 | 19836 | ||
| 19816 | /* RIF: | 19837 | /* RIF: |
| 19817 | Produce glyphs/get display metrics for the display element IT is | 19838 | Produce glyphs/get display metrics for the display element IT is |
| 19818 | loaded with. See the description of struct display_iterator in | 19839 | loaded with. See the description of struct it in dispextern.h |
| 19819 | dispextern.h for an overview of struct display_iterator. */ | 19840 | for an overview of struct it. */ |
| 19820 | 19841 | ||
| 19821 | void | 19842 | void |
| 19822 | x_produce_glyphs (it) | 19843 | x_produce_glyphs (it) |