diff options
| author | Stefan Monnier | 2003-05-24 14:52:10 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-05-24 14:52:10 +0000 |
| commit | 017be6c78048b28ef091095843904daaa18ec63e (patch) | |
| tree | c61966b351772af858045f4b2ffe5ef71aed11ec | |
| parent | de4e4519e4073d173674ad7982ecf0c79be6416f (diff) | |
| download | emacs-017be6c78048b28ef091095843904daaa18ec63e.tar.gz emacs-017be6c78048b28ef091095843904daaa18ec63e.zip | |
(read_key_sequence): Adjust fkey and keytran when dropping `down' events.
| -rw-r--r-- | src/keyboard.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index dd8b751c8d5..c8780867bb0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -9138,6 +9138,27 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9138 | xterm-mouse-mode. -stef | 9138 | xterm-mouse-mode. -stef |
| 9139 | 9139 | ||
| 9140 | Isn't this just the most wonderful code ever? */ | 9140 | Isn't this just the most wonderful code ever? */ |
| 9141 | |||
| 9142 | /* If mock_input > t + 1, the above simplification | ||
| 9143 | will actually end up dropping keys on the floor. | ||
| 9144 | This is probably OK for now, but even | ||
| 9145 | if mock_input <= t + 1, we need to adjust fkey | ||
| 9146 | and keytran. | ||
| 9147 | Typical case [header-line down-mouse-N]: | ||
| 9148 | mock_input = 2, t = 1, fkey.end = 1, | ||
| 9149 | last_real_key_start = 0. */ | ||
| 9150 | if (fkey.end > last_real_key_start) | ||
| 9151 | { | ||
| 9152 | fkey.end = fkey.start | ||
| 9153 | = min (last_real_key_start, fkey.start); | ||
| 9154 | fkey.map = fkey.parent; | ||
| 9155 | if (keytran.end > last_real_key_start) | ||
| 9156 | { | ||
| 9157 | keytran.end = keytran.start | ||
| 9158 | = min (last_real_key_start, keytran.start); | ||
| 9159 | keytran.map = keytran.parent; | ||
| 9160 | } | ||
| 9161 | } | ||
| 9141 | if (t == last_real_key_start) | 9162 | if (t == last_real_key_start) |
| 9142 | { | 9163 | { |
| 9143 | mock_input = 0; | 9164 | mock_input = 0; |