handle_getc: preserve csi for mouse lookup #1991

This commit is contained in:
nick black 2021-07-27 01:07:10 -04:00
parent f69a0eea58
commit 3f0a3e2f35
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -8,7 +8,7 @@
// CSI (Control Sequence Indicators) originate in the terminal itself, and are // 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 // 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[" #define CSIPREFIX "\x1b["
static const uint32_t NCKEY_CSI = 0x90; // guaranteed not to match anything else 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){ while(esc && nc->inputbuf_occupied){
if(esc->special != NCKEY_INVALID){ if(esc->special != NCKEY_INVALID){
if(esc->special == NCKEY_CSI){ if(esc->special == NCKEY_CSI){
csi = NULL; csi = esc;
}else{ }else{
break; break;
} }