diff options
Diffstat (limited to 'src/nvim/tui/input.h')
-rw-r--r-- | src/nvim/tui/input.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/nvim/tui/input.h b/src/nvim/tui/input.h index bf6d0f2978..8d0c0c20e9 100644 --- a/src/nvim/tui/input.h +++ b/src/nvim/tui/input.h @@ -5,7 +5,6 @@ #include <uv.h> #include "nvim/event/defs.h" -#include "nvim/rbuffer_defs.h" #include "nvim/tui/input_defs.h" // IWYU pragma: keep #include "nvim/tui/tui_defs.h" #include "nvim/types_defs.h" @@ -17,6 +16,7 @@ typedef enum { kKeyEncodingXterm, ///< Xterm's modifyOtherKeys encoding (XTMODKEYS) } KeyEncoding; +#define KEY_BUFFER_SIZE 0x1000 typedef struct { int in_fd; // Phases: -1=all 0=disabled 1=first-chunk 2=continue 3=last-chunk @@ -33,17 +33,12 @@ typedef struct { TermKey_Terminfo_Getstr_Hook *tk_ti_hook_fn; ///< libtermkey terminfo hook uv_timer_t timer_handle; Loop *loop; - Stream read_stream; - RBuffer *key_buffer; + RStream read_stream; TUIData *tui_data; + char key_buffer[KEY_BUFFER_SIZE]; + size_t key_buffer_len; } TermInput; -typedef enum { - kIncomplete = -1, - kNotApplicable = 0, - kComplete = 1, -} HandleState; - #ifdef INCLUDE_GENERATED_DECLARATIONS # include "tui/input.h.generated.h" #endif |