emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c,v
Date: Tue, 16 Oct 2007 22:39:25 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/10/16 22:39:24

Index: src/xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1170
retrieving revision 1.1171
diff -u -b -r1.1170 -r1.1171
--- src/xdisp.c 16 Oct 2007 15:42:56 -0000      1.1170
+++ src/xdisp.c 16 Oct 2007 22:39:24 -0000      1.1171
@@ -3827,7 +3827,13 @@
        {
          if (handle_single_display_spec (it, XCAR (prop), object,
                                          position, display_replaced_p))
+           {
            display_replaced_p = 1;
+             /* If some text in a string is replaced, `position' no
+                longer points to the position of `object'.  */
+             if (STRINGP (object))
+               break;
+           }
        }
     }
   else if (VECTORP (prop))
@@ -3836,7 +3842,13 @@
       for (i = 0; i < ASIZE (prop); ++i)
        if (handle_single_display_spec (it, AREF (prop, i), object,
                                        position, display_replaced_p))
+         {
          display_replaced_p = 1;
+           /* If some text in a string is replaced, `position' no
+              longer points to the position of `object'.  */
+           if (STRINGP (object))
+             break;
+         }
     }
   else
     {
@@ -4225,13 +4237,16 @@
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
-         *position = start_pos;
+         if (BUFFERP (object))
+           it->current.pos = start_pos;
        }
       else if (CONSP (value) && EQ (XCAR (value), Qspace))
        {
          it->method = GET_FROM_STRETCH;
          it->object = value;
-         *position = it->position = start_pos;
+         it->position = start_pos;
+         if (BUFFERP (object))
+           it->current.pos = start_pos;
        }
 #ifdef HAVE_WINDOW_SYSTEM
       else
@@ -4245,7 +4260,8 @@
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
-         *position = start_pos;
+         if (BUFFERP (object))
+           it->current.pos = start_pos;
        }
 #endif /* HAVE_WINDOW_SYSTEM */
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]