comparison src/minibuf.c @ 20640:3305df803f6e

(Fminibuffer_complete_word): Fix a bug of refering `i'. We must refer `i_byte' instead.
author Kenichi Handa <handa@m17n.org>
date Mon, 12 Jan 1998 05:49:45 +0000
parents 15deff6b2848
children ed9ed828415e
comparison
equal deleted inserted replaced
20639:12240a9b3679 20640:3305df803f6e
1652 buffer_string = XSTRING (tem)->data; 1652 buffer_string = XSTRING (tem)->data;
1653 completion_string = XSTRING (completion)->data; 1653 completion_string = XSTRING (completion)->data;
1654 buffer_nbytes = XSTRING (tem)->size_byte; /* ie ZV_BYTE - BEGV_BYTE */ 1654 buffer_nbytes = XSTRING (tem)->size_byte; /* ie ZV_BYTE - BEGV_BYTE */
1655 completion_nbytes = XSTRING (completion)->size_byte; 1655 completion_nbytes = XSTRING (completion)->size_byte;
1656 i_byte = buffer_nbytes - completion_nbytes; 1656 i_byte = buffer_nbytes - completion_nbytes;
1657 if (i > 0 || 1657 if (i_byte > 0 ||
1658 0 <= scmp (buffer_string, completion_string, buffer_nbytes)) 1658 0 <= scmp (buffer_string, completion_string, buffer_nbytes))
1659 { 1659 {
1660 /* Set buffer to longest match of buffer tail and completion head. */ 1660 /* Set buffer to longest match of buffer tail and completion head. */
1661 if (i_byte <= 0) i_byte = 1; 1661 if (i_byte <= 0) i_byte = 1;
1662 buffer_string += i_byte; 1662 buffer_string += i_byte;