(insert_1_both): Do nothing if NCHARS == 0.
authorGerd Moellmann <gerd@gnu.org>
Fri, 26 Oct 2001 12:02:42 +0000 (12:02 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 26 Oct 2001 12:02:42 +0000 (12:02 +0000)
src/ChangeLog
src/insdel.c

index dc42d2d..815fc6b 100644 (file)
@@ -1,5 +1,7 @@
 2001-10-26  Gerd Moellmann  <gerd@gnu.org>
 
+       * insdel.c (insert_1_both): Do nothing if NCHARS == 0.
+
        * xterm.c (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
        Fix clearing in the case of scroll bars on the right.
        
index 7963ae0..24bfe8a 100644 (file)
@@ -913,6 +913,9 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers)
      register int nchars, nbytes;
      int inherit, prepare, before_markers;
 {
+  if (nchars == 0)
+    return;
+  
   if (NILP (current_buffer->enable_multibyte_characters))
     nchars = nbytes;