HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ad0815
)
(replace_range): For undo, record insertion first.
author
Richard M. Stallman
<rms@gnu.org>
Sun, 29 Apr 2007 21:57:33 +0000
(21:57 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sun, 29 Apr 2007 21:57:33 +0000
(21:57 +0000)
src/insdel.c
patch
|
blob
|
blame
|
history
diff --git
a/src/insdel.c
b/src/insdel.c
index
7f15f7d
..
65d60b6
100644
(file)
--- a/
src/insdel.c
+++ b/
src/insdel.c
@@
-1603,8
+1603,12
@@
replace_range (from, to, new, prepare, inherit, markers)
if (! EQ (current_buffer->undo_list, Qt))
{
+ /* Record the insertion first, so that when we undo,
+ the deletion will be undone first. Thus, undo
+ will insert before deleting, and thus will keep
+ the markers before and after this text separate. */
+ record_insert (from + SCHARS (deletion), inschars);
record_delete (from, deletion);
- record_insert (from, inschars);
}
GAP_SIZE -= outgoing_insbytes;