diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/undo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/undo.c b/src/undo.c index a0e9f84f7c9..64f773d62c8 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -22,6 +22,7 @@ and this notice must be preserved on all copies. */ | |||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "buffer.h" | 24 | #include "buffer.h" |
| 25 | #include "commands.h" | ||
| 25 | 26 | ||
| 26 | /* Last buffer for which undo information was recorded. */ | 27 | /* Last buffer for which undo information was recorded. */ |
| 27 | Lisp_Object last_undo_buffer; | 28 | Lisp_Object last_undo_buffer; |
| @@ -95,10 +96,10 @@ record_delete (beg, length) | |||
| 95 | XFASTINT (lbeg) = beg; | 96 | XFASTINT (lbeg) = beg; |
| 96 | XFASTINT (lend) = beg + length; | 97 | XFASTINT (lend) = beg + length; |
| 97 | 98 | ||
| 98 | /* If point isn't at start of deleted range, record where it is. */ | 99 | /* If point wasn't at start of deleted range, record where it was. */ |
| 99 | if (PT != XFASTINT (sbeg)) | 100 | if (last_point_position != XFASTINT (sbeg)) |
| 100 | current_buffer->undo_list | 101 | current_buffer->undo_list |
| 101 | = Fcons (make_number (PT), current_buffer->undo_list); | 102 | = Fcons (make_number (last_point_position), current_buffer->undo_list); |
| 102 | 103 | ||
| 103 | current_buffer->undo_list | 104 | current_buffer->undo_list |
| 104 | = Fcons (Fcons (Fbuffer_substring (lbeg, lend), sbeg), | 105 | = Fcons (Fcons (Fbuffer_substring (lbeg, lend), sbeg), |