diff options
| author | Gerd Moellmann | 1999-11-26 12:07:04 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-11-26 12:07:04 +0000 |
| commit | f2cab2ea4abd6d4dddb57ed51a9dffa56b3ca633 (patch) | |
| tree | b9c99e4a1cb12d3ed697897a59ec5d016e25cef3 /src | |
| parent | 48778e46daa24080c3b2653fe39abc947225924c (diff) | |
| download | emacs-f2cab2ea4abd6d4dddb57ed51a9dffa56b3ca633.tar.gz emacs-f2cab2ea4abd6d4dddb57ed51a9dffa56b3ca633.zip | |
(insert_1_both): Call set_text_properties with last
parameter nil so that no after changes will be signaled.
Diffstat (limited to 'src')
| -rw-r--r-- | src/insdel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/insdel.c b/src/insdel.c index 05c86616c1d..f9b38602357 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -568,8 +568,9 @@ adjust_markers_for_replace (from, from_byte, old_chars, old_bytes, | |||
| 568 | } | 568 | } |
| 569 | else | 569 | else |
| 570 | { | 570 | { |
| 571 | m->charpos += diff_chars; | 571 | m->charpos = min (from + new_chars, m->charpos + diff_chars); |
| 572 | m->bytepos += diff_bytes; | 572 | m->bytepos = min (from_byte + new_bytes, |
| 573 | m->bytepos + diff_bytes); | ||
| 573 | } | 574 | } |
| 574 | } | 575 | } |
| 575 | else if (m->bytepos >= from_byte) | 576 | else if (m->bytepos >= from_byte) |
| @@ -1188,8 +1189,8 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers) | |||
| 1188 | offset_intervals (current_buffer, PT, nchars); | 1189 | offset_intervals (current_buffer, PT, nchars); |
| 1189 | 1190 | ||
| 1190 | if (!inherit && BUF_INTERVALS (current_buffer) != 0) | 1191 | if (!inherit && BUF_INTERVALS (current_buffer) != 0) |
| 1191 | Fset_text_properties (make_number (PT), make_number (PT + nchars), | 1192 | set_text_properties (make_number (PT), make_number (PT + nchars), |
| 1192 | Qnil, Qnil); | 1193 | Qnil, Qnil, Qnil); |
| 1193 | 1194 | ||
| 1194 | { | 1195 | { |
| 1195 | int pos = PT, pos_byte = PT_BYTE; | 1196 | int pos = PT, pos_byte = PT_BYTE; |