aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-10-31 02:01:25 +0000
committerGerd Moellmann1999-10-31 02:01:25 +0000
commit80c6cb1ff0ab4241f97784fedbe7d65be3dfb824 (patch)
tree5794172780b9198b14c0c703690406d2a4977f07
parent2bdedac1008b386f70f347db7424a3c6fcceef66 (diff)
downloademacs-80c6cb1ff0ab4241f97784fedbe7d65be3dfb824.tar.gz
emacs-80c6cb1ff0ab4241f97784fedbe7d65be3dfb824.zip
(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.
-rw-r--r--src/xdisp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 0b0d0383957..fd9d7c7d230 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -603,7 +603,7 @@ static Lisp_Object eval_form P_ ((Lisp_Object));
603static void insert_left_trunc_glyphs P_ ((struct it *)); 603static void insert_left_trunc_glyphs P_ ((struct it *));
604static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *)); 604static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *));
605static void extend_face_to_end_of_line P_ ((struct it *)); 605static void extend_face_to_end_of_line P_ ((struct it *));
606static void append_space P_ ((struct it *, int)); 606static int append_space P_ ((struct it *, int));
607static void make_cursor_line_fully_visible P_ ((struct window *)); 607static void make_cursor_line_fully_visible P_ ((struct window *));
608static int try_scrolling P_ ((Lisp_Object, int, int, int, int)); 608static int try_scrolling P_ ((Lisp_Object, int, int, int, int));
609static int trailing_whitespace_p P_ ((int)); 609static int trailing_whitespace_p P_ ((int));
@@ -10723,7 +10723,7 @@ compute_line_metrics (it)
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
@@ -10733,7 +10733,7 @@ compute_line_metrics (it)
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
10736static void 10736static int
10737append_space (it, default_face_p) 10737append_space (it, default_face_p)
10738 struct it *it; 10738 struct it *it;
10739 int default_face_p; 10739 int default_face_p;
@@ -10778,8 +10778,11 @@ append_space (it, default_face_p)
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 return 1;
10781 } 10782 }
10782 } 10783 }
10784
10785 return 0;
10783} 10786}
10784 10787
10785 10788
@@ -11006,13 +11009,11 @@ display_line (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