summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-11-26 12:07:04 +0000
committerGerd Moellmann <gerd@gnu.org>1999-11-26 12:07:04 +0000
commitf2cab2ea4abd6d4dddb57ed51a9dffa56b3ca633 (patch)
treeb9c99e4a1cb12d3ed697897a59ec5d016e25cef3 /src/insdel.c
parent48778e46daa24080c3b2653fe39abc947225924c (diff)
downloademacs-f2cab2ea4abd6d4dddb57ed51a9dffa56b3ca633.tar.gz
(insert_1_both): Call set_text_properties with last
parameter nil so that no after changes will be signaled.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c9
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,
}
else
{
- m->charpos += diff_chars;
- m->bytepos += diff_bytes;
+ m->charpos = min (from + new_chars, m->charpos + diff_chars);
+ m->bytepos = min (from_byte + new_bytes,
+ m->bytepos + diff_bytes);
}
}
else if (m->bytepos >= from_byte)
@@ -1188,8 +1189,8 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers)
offset_intervals (current_buffer, PT, nchars);
if (!inherit && BUF_INTERVALS (current_buffer) != 0)
- Fset_text_properties (make_number (PT), make_number (PT + nchars),
- Qnil, Qnil);
+ set_text_properties (make_number (PT), make_number (PT + nchars),
+ Qnil, Qnil, Qnil);
{
int pos = PT, pos_byte = PT_BYTE;