mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
handle_getc: preserve csi for mouse lookup #1991
This commit is contained in:
parent
f69a0eea58
commit
3f0a3e2f35
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user