From d1653ef4e61db9e043ffc4f819a7acddc890ac83 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 17 Jan 2008 15:22:42 +0000 Subject: (handle_one_xevent): Revert to counting chars not bytes. (XTread_socket): Clarify what return value is counting in comment. --- src/xterm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xterm.c') diff --git a/src/xterm.c b/src/xterm.c index 7f948815860..96638c2ee5f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6488,9 +6488,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) kbd_buffer_store_event_hold (&inev.ie, hold_quit); } - /* Previous code updated count by nchars rather than nbytes, - but that seems bogus to me. ++kfs */ - count += nbytes; + count += nchars; inev.ie.kind = NO_EVENT; /* Already stored above. */ @@ -6989,7 +6987,9 @@ x_dispatch_event (event, display) We return as soon as there are no more events to be read. We return the number of characters stored into the buffer, - thus pretending to be `read'. + thus pretending to be `read' (except the characters we store + in the keyboard buffer can be multibyte, so are not necessarily + C chars). EXPECTED is nonzero if the caller knows input is available. */ -- cgit v1.2.1