]> git.eshelyaron.com Git - emacs.git/commitdiff
(display_text_line): Properly handle charstarts for hscroll,
authorRichard M. Stallman <rms@gnu.org>
Mon, 4 Apr 1994 00:44:27 +0000 (00:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 4 Apr 1994 00:44:27 +0000 (00:44 +0000)
and for continuation in mid character.
(message2): Call frame_up_to_date_hook.

src/xdisp.c

index a00b529361987e72937af4f670ab8a97f03cbc86..f626bc83a48ad14c8fc924765203f7d312a4f793 100644 (file)
@@ -237,6 +237,8 @@ message2 (m, len)
       echo_area_display ();
       update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1);
       do_pending_window_change ();
+      if (frame_up_to_date_hook != 0 && ! gc_in_progress)
+       (*frame_up_to_date_hook) (XFRAME (XWINDOW (minibuf_window)->frame));
     }
 }
 
@@ -2092,7 +2094,8 @@ display_text_line (w, start, vpos, hpos, taboffset)
     {
       /* Record which glyph starts a character,
         and the character position of that character.  */
-      charstart[p1 - p1start] = pos;
+      if (p1 >= p1start)
+       charstart[p1 - p1start] = pos;
 
       if (p1 >= endp)
        break;
@@ -2280,19 +2283,31 @@ display_text_line (w, start, vpos, hpos, taboffset)
          p1++;
        }
 
-      /* For all the glyphs occupied by this character, except for the
-        first, store -1 in charstarts.  */
-      if (p1 != p1prev)
+      /* Do nothing here for a char that's entirely off the left edge.  */
+      if (p1 >= p1start)
        {
-         int *p2x = &charstart[p1prev - p1start] + 1;
-         int *p2 = &charstart[p1 - p1start];
-         while (p2x != p2)
-           *p2x++ = -1;
+         /* For all the glyphs occupied by this character, except for the
+            first, store -1 in charstarts.  */
+         if (p1 != p1prev)
+           {
+             int *p2x = &charstart[p1prev - p1start];
+             int *p2 = &charstart[p1 - p1start];
+
+             /* The window's left column should always
+                contain a character position.
+                And don't clobber anything to the left of that.  */
+             if (p1prev < p1start)
+               {
+                 charstart[0] = pos;
+                 p2x = charstart;
+               }
+
+             /* This loop skips over the char p2x initially points to.  */
+             while (++p2x != p2)
+               *p2x = -1;
+           }
        }
-      else
-       /* If this character took up no space,
-          erase all mention of it from charstart.  */
-       charstart[p1 - p1start] = 0;
+
       pos++;
     }