emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/insdel.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/insdel.c
Date: Tue, 01 Feb 2005 18:47:06 -0500

Index: emacs/src/insdel.c
diff -c emacs/src/insdel.c:1.180 emacs/src/insdel.c:1.181
*** emacs/src/insdel.c:1.180    Thu Dec  2 23:37:13 2004
--- emacs/src/insdel.c  Tue Feb  1 23:47:06 2005
***************
*** 1,5 ****
  /* Buffer insertion/deletion and gap motion for GNU Emacs.
!    Copyright (C) 1985, 86,93,94,95,97,98, 1999, 2000, 01, 2003
     Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
--- 1,5 ----
  /* Buffer insertion/deletion and gap motion for GNU Emacs.
!    Copyright (C) 1985, 86,93,94,95,97,98, 1999, 2000, 01, 2003, 2005
     Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
***************
*** 1745,1761 ****
  
    /* Adjust markers for the deletion and the insertion.  */
    if (markers
!       && ! (nchars_del == 1 && inschars == 1))
      adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
                                inschars, insbytes);
  
    offset_intervals (current_buffer, from, inschars - nchars_del);
  
    /* Relocate point as if it were a marker.  */
!   if (from < PT && nchars_del != inschars)
!     adjust_point ((from + inschars - (PT < to ? PT : to)),
!                 (from_byte + insbytes
!                  - (PT_BYTE < to_byte ? PT_BYTE : to_byte)));
  
    if (insbytes == 0)
      evaporate_overlays (from);
--- 1745,1765 ----
  
    /* Adjust markers for the deletion and the insertion.  */
    if (markers
!       && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes))
      adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
                                inschars, insbytes);
  
    offset_intervals (current_buffer, from, inschars - nchars_del);
  
    /* Relocate point as if it were a marker.  */
!   if (from < PT && (nchars_del != inschars || nbytes_del != insbytes))
!     {
!       if (PT < to)
!       /* PT was within the deleted text.  Move it to FROM.  */
!       adjust_point (from - PT, from_byte - PT_BYTE);
!       else
!       adjust_point (inschars - nchars_del, insbytes - nbytes_del);
!     }
  
    if (insbytes == 0)
      evaporate_overlays (from);




reply via email to

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