[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c |
Date: |
Fri, 31 Dec 2004 20:46:13 -0500 |
Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.952 emacs/src/xdisp.c:1.953
*** emacs/src/xdisp.c:1.952 Thu Dec 30 18:07:07 2004
--- emacs/src/xdisp.c Sat Jan 1 01:34:22 2005
***************
*** 3270,3275 ****
--- 3270,3276 ----
IT's face is restored in set_iterator_to_next. */
it->saved_face_id = it->face_id;
it->method = next_element_from_display_vector;
+ it->ellipsis_p = 1;
}
***************
*** 4912,4917 ****
--- 4913,4919 ----
it->current.dpvec_index = 0;
it->saved_face_id = it->face_id;
it->method = next_element_from_display_vector;
+ it->ellipsis_p = 0;
}
else
{
***************
*** 5062,5067 ****
--- 5064,5070 ----
it->current.dpvec_index = 0;
it->saved_face_id = it->face_id;
it->method = next_element_from_display_vector;
+ it->ellipsis_p = 0;
goto get_next;
}
}
***************
*** 5703,5712 ****
saved_glyph_row = it->glyph_row;
it->glyph_row = NULL;
! #define BUFFER_POS_REACHED_P() \
! ((op & MOVE_TO_POS) != 0 \
! && BUFFERP (it->object) \
! && IT_CHARPOS (*it) >= to_charpos)
while (1)
{
--- 5706,5716 ----
saved_glyph_row = it->glyph_row;
it->glyph_row = NULL;
! #define BUFFER_POS_REACHED_P() \
! ((op & MOVE_TO_POS) != 0 \
! && BUFFERP (it->object) \
! && IT_CHARPOS (*it) >= to_charpos \
! && it->method == next_element_from_buffer)
while (1)
{
***************
*** 10812,10817 ****
--- 10816,10833 ----
glyph = cursor;
x = cursor_x;
}
+ else if (row->ends_in_ellipsis_p && glyph == end)
+ {
+ /* Scan back over the ellipsis glyphs, decrementing positions. */
+ while (glyph > row->glyphs[TEXT_AREA]
+ && (glyph - 1)->charpos == last_pos)
+ glyph--, x -= glyph->pixel_width;
+ /* That loop always goes one position too far,
+ including the glyph before the ellipsis.
+ So scan forward over that one. */
+ x += glyph->pixel_width;
+ glyph++;
+ }
else if (string_start
&& (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
{
***************
*** 14613,14622 ****
/* If the row ends with a newline from a string, we don't want
the cursor there (if the row is continued it doesn't end in a
newline). */
! if (CHARPOS (row->end.string_pos) >= 0
! || MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row))
cursor_row_p = row->continued_p;
!
/* If the row ends at ZV, display the cursor at the end of that
row instead of at the start of the row below. */
else if (row->ends_at_zv_p)
--- 14629,14650 ----
/* If the row ends with a newline from a string, we don't want
the cursor there (if the row is continued it doesn't end in a
newline). */
! if (CHARPOS (row->end.string_pos) >= 0)
cursor_row_p = row->continued_p;
! else if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row))
! {
! /* If the row ends in middle of a real character,
! and the line is continued, we want the cursor here.
! That's because MATRIX_ROW_END_CHARPOS would equal
! PT if PT is before the character. */
! if (!row->ends_in_ellipsis_p)
! cursor_row_p = row->continued_p;
! else
! /* If the row ends in an ellipsis, then
! MATRIX_ROW_END_CHARPOS will equal point after the invisible text.
! We want that position to be displayed after the ellipsis. */
! cursor_row_p = 0;
! }
/* If the row ends at ZV, display the cursor at the end of that
row instead of at the start of the row below. */
else if (row->ends_at_zv_p)
***************
*** 15093,15098 ****
--- 15121,15131 ----
/* Remember the position at which this line ends. */
row->end = it->current;
+ /* Record whether this row ends inside an ellipsis. */
+ row->ends_in_ellipsis_p
+ = (it->method == next_element_from_display_vector
+ && it->ellipsis_p);
+
/* Save fringe bitmaps in this row. */
row->left_user_fringe_bitmap = it->left_user_fringe_bitmap;
row->left_user_fringe_face_id = it->left_user_fringe_face_id;
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M . Stallman, 2004/12/08
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2004/12/13
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M . Stallman, 2004/12/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M . Stallman, 2004/12/27
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Steven Tamm, 2004/12/27
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M . Stallman, 2004/12/28
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kenichi Handa, 2004/12/30
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2004/12/30
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2004/12/30
- [Emacs-diffs] Changes to emacs/src/xdisp.c,
Richard M . Stallman <=