diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-01-12 10:13:51 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-01-12 10:13:51 -0500 |
commit | 4c55c34efaabaa151391edf59c59a14411a79d8c (patch) | |
tree | 47e1caa73bf442035dc3a929c866c27df778dc2b /src/nvim/os/input.c | |
parent | c53852a244fd78bcf11e37ddc94e8a847e80062a (diff) | |
parent | 62c1daffe028185030d0d8e95dc2c6532457b4fa (diff) | |
download | rneovim-4c55c34efaabaa151391edf59c59a14411a79d8c.tar.gz rneovim-4c55c34efaabaa151391edf59c59a14411a79d8c.tar.bz2 rneovim-4c55c34efaabaa151391edf59c59a14411a79d8c.zip |
Merge pull request #1657 from tarruda/abstract-ui-fixes
[WIP] "abstract_ui" fixes and improvements
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r-- | src/nvim/os/input.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index c0d588f4ef..130e239a34 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -187,14 +187,20 @@ size_t input_enqueue(String keys) unsigned int new_size = trans_special((uint8_t **)&ptr, buf, false); if (!new_size) { + if (*ptr == '<') { + // Invalid key sequence, skip until the next '>' or until *end + do { + ptr++; + } while (ptr < end && *ptr != '>'); + ptr++; + continue; + } // copy the character unmodified *buf = (uint8_t)*ptr++; new_size = 1; } new_size = handle_mouse_event(&ptr, buf, new_size); - // TODO(tarruda): Don't produce past unclosed '<' characters, except if - // there's a lot of characters after the '<' rbuffer_write(input_buffer, (char *)buf, new_size); } |