diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-06-01 10:18:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-01 10:18:44 +0200 |
| commit | 1d091e52f09c8167eeaa03a6e5c44070ea198c6b (patch) | |
| tree | 8dd1ea1f488461c9c66311faaf08e3f3abdb9c8c /src/nvim/tui/input.h | |
| parent | 2008fe7b85a8c03cbff3ed51c5715ddf5cb555fd (diff) | |
| parent | 0ba087df5e3c69e1f5a5e6551dc05d6793f5f64f (diff) | |
| download | rneovim-1d091e52f09c8167eeaa03a6e5c44070ea198c6b.tar.gz rneovim-1d091e52f09c8167eeaa03a6e5c44070ea198c6b.tar.bz2 rneovim-1d091e52f09c8167eeaa03a6e5c44070ea198c6b.zip | |
Merge pull request #29114 from bfredl/key_buffer
refactor(tui): use a linear buffer for buffered keys
Diffstat (limited to 'src/nvim/tui/input.h')
| -rw-r--r-- | src/nvim/tui/input.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/tui/input.h b/src/nvim/tui/input.h index 646fbdd16a..c594228c07 100644 --- a/src/nvim/tui/input.h +++ b/src/nvim/tui/input.h @@ -17,6 +17,7 @@ typedef enum { kKeyEncodingXterm, ///< Xterm's modifyOtherKeys encoding (XTMODKEYS) } KeyEncoding; +#define KEY_BUFFER_SIZE 0xfff typedef struct { int in_fd; // Phases: -1=all 0=disabled 1=first-chunk 2=continue 3=last-chunk @@ -34,8 +35,9 @@ typedef struct { uv_timer_t timer_handle; Loop *loop; RStream read_stream; - RBuffer *key_buffer; TUIData *tui_data; + char key_buffer[KEY_BUFFER_SIZE]; + size_t key_buffer_len; } TermInput; typedef enum { |