Mercurial > emacs
changeset 40433:3f11c065fa9e
(XTread_socket) <KeyPress>: Don't use
STRING_CHAR_AND_LENGTH if nchars == nbytes. From Kenichi Handa
<handa@etl.go.jp>.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 29 Oct 2001 09:44:31 +0000 |
parents | 225bd38b0ce7 |
children | 19b5ee5b4397 |
files | src/xterm.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Mon Oct 29 09:35:04 2001 +0000 +++ b/src/xterm.c Mon Oct 29 09:44:31 2001 +0000 @@ -10593,8 +10593,12 @@ character events. */ for (i = 0; i < nbytes; i += len) { - c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, - nbytes - i, len); + if (nchars == nbytes) + c = copy_bufptr[i], len = 1; + else + c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, + nbytes - i, len); + bufp->kind = (SINGLE_BYTE_CHAR_P (c) ? ascii_keystroke : multibyte_char_keystroke);