aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/insdel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 9facec4cf34..06e638526bc 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1546,7 +1546,11 @@ insert_from_buffer_1 (buf, from, nchars, inherit)
1546 not including the combined-before bytes. */ 1546 not including the combined-before bytes. */
1547 intervals = BUF_INTERVALS (buf); 1547 intervals = BUF_INTERVALS (buf);
1548 if (outgoing_nbytes < BUF_Z_BYTE (buf) - BUF_BEG_BYTE (buf)) 1548 if (outgoing_nbytes < BUF_Z_BYTE (buf) - BUF_BEG_BYTE (buf))
1549 intervals = copy_intervals (intervals, from, nchars); 1549 {
1550 if (buf == current_buffer && PT <= from)
1551 from += nchars;
1552 intervals = copy_intervals (intervals, from, nchars);
1553 }
1550 1554
1551 /* Insert those intervals. */ 1555 /* Insert those intervals. */
1552 graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit); 1556 graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit);