comparison src/xdisp.c @ 26255:4ebced8747b7

(append_space): Return non-zero if space was appended. (display_line): Set charpos of first glyph to -1 only if that glyph is the space added by append_glyph.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 31 Oct 1999 02:01:25 +0000
parents 47d54b67bce2
children 4ca4f3f6c4a0
comparison
equal deleted inserted replaced
26254:a393c5e46e99 26255:4ebced8747b7
601 static Lisp_Object eval_handler P_ ((Lisp_Object)); 601 static Lisp_Object eval_handler P_ ((Lisp_Object));
602 static Lisp_Object eval_form P_ ((Lisp_Object)); 602 static Lisp_Object eval_form P_ ((Lisp_Object));
603 static void insert_left_trunc_glyphs P_ ((struct it *)); 603 static void insert_left_trunc_glyphs P_ ((struct it *));
604 static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *)); 604 static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *));
605 static void extend_face_to_end_of_line P_ ((struct it *)); 605 static void extend_face_to_end_of_line P_ ((struct it *));
606 static void append_space P_ ((struct it *, int)); 606 static int append_space P_ ((struct it *, int));
607 static void make_cursor_line_fully_visible P_ ((struct window *)); 607 static void make_cursor_line_fully_visible P_ ((struct window *));
608 static int try_scrolling P_ ((Lisp_Object, int, int, int, int)); 608 static int try_scrolling P_ ((Lisp_Object, int, int, int, int));
609 static int trailing_whitespace_p P_ ((int)); 609 static int trailing_whitespace_p P_ ((int));
610 static int message_log_check_duplicate P_ ((int, int, int, int)); 610 static int message_log_check_duplicate P_ ((int, int, int, int));
611 int invisible_p P_ ((Lisp_Object, Lisp_Object)); 611 int invisible_p P_ ((Lisp_Object, Lisp_Object));
10721 10721
10722 10722
10723 /* Append one space to the glyph row of iterator IT if doing a 10723 /* Append one space to the glyph row of iterator IT if doing a
10724 window-based redisplay. DEFAULT_FACE_P non-zero means let the 10724 window-based redisplay. DEFAULT_FACE_P non-zero means let the
10725 space have the default face, otherwise let it have the same face as 10725 space have the default face, otherwise let it have the same face as
10726 IT->face_id. 10726 IT->face_id. Value is non-zero if a space was added.
10727 10727
10728 This function is called to make sure that there is always one glyph 10728 This function is called to make sure that there is always one glyph
10729 at the end of a glyph row that the cursor can be set on under 10729 at the end of a glyph row that the cursor can be set on under
10730 window-systems. (If there weren't such a glyph we would not know 10730 window-systems. (If there weren't such a glyph we would not know
10731 how wide and tall a box cursor should be displayed). 10731 how wide and tall a box cursor should be displayed).
10732 10732
10733 At the same time this space let's a nicely handle clearing to the 10733 At the same time this space let's a nicely handle clearing to the
10734 end of the line if the row ends in italic text. */ 10734 end of the line if the row ends in italic text. */
10735 10735
10736 static void 10736 static int
10737 append_space (it, default_face_p) 10737 append_space (it, default_face_p)
10738 struct it *it; 10738 struct it *it;
10739 int default_face_p; 10739 int default_face_p;
10740 { 10740 {
10741 if (FRAME_WINDOW_P (it->f)) 10741 if (FRAME_WINDOW_P (it->f))
10776 it->object = saved_object; 10776 it->object = saved_object;
10777 it->position = saved_pos; 10777 it->position = saved_pos;
10778 it->what = saved_what; 10778 it->what = saved_what;
10779 it->face_id = saved_face_id; 10779 it->face_id = saved_face_id;
10780 it->charset = saved_charset; 10780 it->charset = saved_charset;
10781 } 10781 return 1;
10782 } 10782 }
10783 }
10784
10785 return 0;
10783 } 10786 }
10784 10787
10785 10788
10786 /* Extend the face of the last glyph in the text area of IT->glyph_row 10789 /* Extend the face of the last glyph in the text area of IT->glyph_row
10787 to the end of the display line. Called from display_line. 10790 to the end of the display line. Called from display_line.
11004 buffer reached. */ 11007 buffer reached. */
11005 if (!get_next_display_element (it)) 11008 if (!get_next_display_element (it))
11006 { 11009 {
11007 /* Maybe add a space at the end of this line that is used to 11010 /* Maybe add a space at the end of this line that is used to
11008 display the cursor there under X. */ 11011 display the cursor there under X. */
11009 append_space (it, 1); 11012 if (append_space (it, 1) && row->used[TEXT_AREA] == 1)
11010
11011 /* The position -1 below indicates a blank line not
11012 corresponding to any text, as opposed to an empty line
11013 corresponding to a line end. */
11014 if (row->used[TEXT_AREA] <= 1)
11015 { 11013 {
11014 /* The position -1 below indicates a blank line not
11015 corresponding to any text, as opposed to an empty line
11016 corresponding to a line end. */
11016 row->glyphs[TEXT_AREA]->charpos = -1; 11017 row->glyphs[TEXT_AREA]->charpos = -1;
11017 row->displays_text_p = 0; 11018 row->displays_text_p = 0;
11018 11019
11019 if (!NILP (XBUFFER (it->w->buffer)->indicate_empty_lines)) 11020 if (!NILP (XBUFFER (it->w->buffer)->indicate_empty_lines))
11020 row->indicate_empty_line_p = 1; 11021 row->indicate_empty_line_p = 1;