From: Stefan Monnier Date: Thu, 3 Apr 2008 20:01:31 +0000 (+0000) Subject: (insert_from_buffer_1): Don't compare bytes in destination X-Git-Tag: emacs-pretest-23.0.90~6622 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1a6b2163ced8440664a1e0045f7124298386d01;p=emacs.git (insert_from_buffer_1): Don't compare bytes in destination buffer with byte-size of source buffer. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2093bb61752..5ae4fc6beb8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-03 Stefan Monnier + + * insdel.c (insert_from_buffer_1): Don't compare bytes in destination + buffer with byte-size of source buffer. + 2008-04-03 Chong Yidong * callint.c (Fcall_interactively): Handle temporary region even diff --git a/src/insdel.c b/src/insdel.c index 2919c183ab7..884620d3899 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1352,7 +1352,7 @@ insert_from_buffer_1 (buf, from, nchars, inherit) /* Get the intervals for the part of the string we are inserting. */ intervals = BUF_INTERVALS (buf); - if (outgoing_nbytes < BUF_Z_BYTE (buf) - BUF_BEG_BYTE (buf)) + if (nchars < BUF_Z (buf) - BUF_BEG (buf)) { if (buf == current_buffer && PT <= from) from += nchars;