From 3f0a3e2f35e60fa75c2de7d228d6041674690c4e Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 27 Jul 2021 01:07:10 -0400 Subject: [PATCH] handle_getc: preserve csi for mouse lookup #1991 --- src/lib/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/input.c b/src/lib/input.c index 98e568966..9b63d5ab9 100644 --- a/src/lib/input.c +++ b/src/lib/input.c @@ -8,7 +8,7 @@ // CSI (Control Sequence Indicators) originate in the terminal itself, and are // not reported in their bare form to the user. For our purposes, these usually -// indicate a mouse event. +// indicate a mouse event or a cursor location report. #define CSIPREFIX "\x1b[" static const uint32_t NCKEY_CSI = 0x90; // guaranteed not to match anything else @@ -326,7 +326,7 @@ handle_getc(ncinputlayer* nc, int kpress, ncinput* ni, int leftmargin, int topma while(esc && nc->inputbuf_occupied){ if(esc->special != NCKEY_INVALID){ if(esc->special == NCKEY_CSI){ - csi = NULL; + csi = esc; }else{ break; }