changeset 22048:26a0c01f7551

(Fminibuffer_complete_word): Fix the string-comparison loop.
author Richard M. Stallman <rms@gnu.org>
date Wed, 13 May 1998 00:30:55 +0000
parents 678a1ed22116
children 247682b1da6b
files src/minibuf.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Wed May 13 00:03:19 1998 +0000
+++ b/src/minibuf.c	Wed May 13 00:30:55 1998 +0000
@@ -1726,10 +1726,9 @@
 	if (i <= 0) i = 1;
 	start_pos= i;
 	buffer_nchars -= i;
-	while (1)
+	while (i > 0)
 	  {
-	    tem1 = Fcompare_strings (tem, make_number (start_pos),
-				     make_number (buffer_nchars + start_pos),
+	    tem1 = Fcompare_strings (tem, make_number (start_pos), Qnil,
 				     completion, make_number (0),
 				     make_number (buffer_nchars),
 				     completion_ignore_case ? Qt : Qnil);
@@ -1737,6 +1736,7 @@
 	    if (EQ (tem1, Qt))
 	      break;
 	    i++;
+	    buffer_nchars--;
 	  }
 	del_range (1, i + 1);
 	SET_PT_BOTH (ZV, ZV_BYTE);