diff options
author | Jason Rumney <jasonr@gnu.org> | 2008-01-17 15:23:38 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2008-01-17 15:23:38 +0000 |
commit | d616968003b11307a17d0995f9d6bfbe12b6c51c (patch) | |
tree | 62fafd7a514afa911efa6ec990a2add7c669e653 | |
parent | 5ba43af2c2aa0653a6a0f3413b9e35cd16ccb7be (diff) | |
download | emacs-d616968003b11307a17d0995f9d6bfbe12b6c51c.tar.gz emacs-d616968003b11307a17d0995f9d6bfbe12b6c51c.tar.bz2 emacs-d616968003b11307a17d0995f9d6bfbe12b6c51c.zip |
(handle_one_xevent): Revert to counting chars not bytes.
(XTread_socket): Clarify what return value is counting in comment.
-rw-r--r-- | src/ChangeLog | 2 | ||||
-rw-r--r-- | src/xterm.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a2cb8c490a6..b28c1d9ac05 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-01-17 Jason Rumney <jasonr@gnu.org> + * xterm.c (handle_one_xevent): Revert to counting chars not bytes. + * w32term.c (w32_read_socket) <WM_CHAR>: Decode characters outside the unicode range available in MULE by locale-coding-system. Improve dbcs lead byte detection. Set event timestamp and modifiers 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. */ |