Changeset 8459609


Ignore:
Timestamp:
Sep 11, 2009, 11:47:33 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
2340422
Parents:
b9df757
Message:
editwin: Properly update points inside a replaced region.

If the point is inside a region that is replaced, the correct thing to
do is to send it to the new end, not the old end.

Moreover, if the region shrunk and was near the end of the buffer, the
old behavior would even result in e->index > e->bufflen, which could
result in a crash.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    r0d9c90c r8459609  
    570570  if (*target > start) {
    571571    if (*target <= end)
    572       *target = end;
     572      *target = end + change;
    573573    else
    574574      *target += change;
Note: See TracChangeset for help on using the changeset viewer.