diff options
| author | Gerd Moellmann | 2000-08-18 03:13:27 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-18 03:13:27 +0000 |
| commit | e4457b09c80553497e5930a2c0b0a6125f53d927 (patch) | |
| tree | c39369c53360d5c99f4d51e709ebef27ca5991fc /src | |
| parent | 4618074a71d30b991896a62e1ce5cbbba3baeb74 (diff) | |
| download | emacs-e4457b09c80553497e5930a2c0b0a6125f53d927.tar.gz emacs-e4457b09c80553497e5930a2c0b0a6125f53d927.zip | |
(kbd_buffer_get_event): Handle the case that the
second half of a HELP_EVENT is found at the start of kbd_buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 4d48c22f30e..97687aad09f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3474,22 +3474,26 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3474 | kbd_fetch_ptr = event + 1; | 3474 | kbd_fetch_ptr = event + 1; |
| 3475 | else if (event->kind == HELP_EVENT) | 3475 | else if (event->kind == HELP_EVENT) |
| 3476 | { | 3476 | { |
| 3477 | /* There are always two consecutive HELP_EVENTs in the | 3477 | /* There are always two HELP_EVENTs in the input queue. */ |
| 3478 | input queue. */ | ||
| 3479 | Lisp_Object object, position, help, frame, window; | 3478 | Lisp_Object object, position, help, frame, window; |
| 3480 | 3479 | ||
| 3481 | xassert (event->code == 0); | 3480 | xassert (event->code == 0); |
| 3482 | frame = event->frame_or_window; | 3481 | frame = event->frame_or_window; |
| 3483 | object = event->arg; | 3482 | object = event->arg; |
| 3484 | position = event->x; | 3483 | position = event->x; |
| 3485 | xassert ((event + 1)->code == 1); | 3484 | |
| 3486 | help = (event + 1)->arg; | 3485 | kbd_fetch_ptr = event + 1; |
| 3487 | window = (event + 1)->frame_or_window; | 3486 | event = ((kbd_fetch_ptr < kbd_buffer + KBD_BUFFER_SIZE) |
| 3487 | ? kbd_fetch_ptr | ||
| 3488 | : kbd_buffer); | ||
| 3489 | xassert (event->code == 1); | ||
| 3490 | help = event->arg; | ||
| 3491 | window = event->frame_or_window; | ||
| 3488 | if (!WINDOWP (window)) | 3492 | if (!WINDOWP (window)) |
| 3489 | window = Qnil; | 3493 | window = Qnil; |
| 3490 | obj = Fcons (Qhelp_echo, | 3494 | obj = Fcons (Qhelp_echo, |
| 3491 | list5 (frame, help, window, object, position)); | 3495 | list5 (frame, help, window, object, position)); |
| 3492 | kbd_fetch_ptr = event + 2; | 3496 | kbd_fetch_ptr = event + 1; |
| 3493 | } | 3497 | } |
| 3494 | else if (event->kind == FOCUS_IN_EVENT) | 3498 | else if (event->kind == FOCUS_IN_EVENT) |
| 3495 | { | 3499 | { |