mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
handle_csi: translate mouse coordinates by margins #609
This commit is contained in:
parent
84c51d9bde
commit
a6629e2ae8
@ -162,7 +162,7 @@ handle_csi(notcurses* nc, ncinput* ni){
|
||||
break;
|
||||
}
|
||||
if(ni){
|
||||
ni->x = param - 1;
|
||||
ni->x = param - 1 - nc->margin_l;
|
||||
}
|
||||
param = 0;
|
||||
}else if(isdigit(candidate)){
|
||||
@ -180,7 +180,7 @@ handle_csi(notcurses* nc, ncinput* ni){
|
||||
break;
|
||||
}
|
||||
if(ni){
|
||||
ni->y = param - 1;
|
||||
ni->y = param - 1 - nc->margin_t;
|
||||
ni->id = id;
|
||||
}
|
||||
return id;
|
||||
|
Loading…
Reference in New Issue
Block a user