aboutsummaryrefslogtreecommitdiffstats
path: root/libterminput.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-10 12:12:06 +0200
committerMattias Andrée <maandree@kth.se>2021-04-10 12:12:06 +0200
commit4cffaa1b3f1a78805977db1565111b8e894d3c17 (patch)
tree96d338262f77e0f64c591381ef21a5ab15b5dcd8 /libterminput.h
parentAdd tests and make some fixes (diff)
downloadlibterminput-4cffaa1b3f1a78805977db1565111b8e894d3c17.tar.gz
libterminput-4cffaa1b3f1a78805977db1565111b8e894d3c17.tar.bz2
libterminput-4cffaa1b3f1a78805977db1565111b8e894d3c17.tar.xz
Fix bracketed paste support
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libterminput.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libterminput.h b/libterminput.h
index 95eea11..6029305 100644
--- a/libterminput.h
+++ b/libterminput.h
@@ -172,12 +172,13 @@ struct libterminput_state {
int inited; /* whether the input in initialised, not this struct */
enum libterminput_mod mods;
enum libterminput_flags flags;
- size_t stored_head;
- size_t stored_tail;
char bracketed_paste;
char mouse_tracking;
char meta;
char n;
+ size_t stored_head;
+ size_t stored_tail;
+ char paused;
char npartial;
char partial[7];
char key[44];
@@ -198,7 +199,7 @@ int libterminput_read(int fd, union libterminput_input *input, struct libterminp
inline int
libterminput_is_ready(union libterminput_input *input, struct libterminput_state *ctx)
{
- if (!ctx->inited)
+ if (!ctx->inited || ctx->paused)
return 0;
if (input->type == LIBTERMINPUT_KEYPRESS && input->keypress.times > 1)
return 1;