From 8cf08582766e662b1dbc979b4f5b8dfb60ed4e90 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Thu, 12 Apr 2012 17:02:45 +0100 Subject: Use spare bits in code.mouse[3] to store bigger mouse positions --- t/30mouse.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/30mouse.c b/t/30mouse.c index a466bb4..f6cb707 100644 --- a/t/30mouse.c +++ b/t/30mouse.c @@ -10,7 +10,7 @@ int main(int argc, char *argv[]) char buffer[32]; size_t len; - plan_tests(58); + plan_tests(60); /* vt100 doesn't have a mouse, we need xterm */ tk = termkey_new_abstract("xterm", 0); @@ -126,6 +126,14 @@ int main(int argc, char *argv[]) is_int(ev, TERMKEY_MOUSE_RELEASE, "mouse event for release SGR"); + termkey_push_bytes(tk, "\e[<0;500;300M", 13); + + termkey_getkey(tk, &key); + termkey_interpret_mouse(tk, &key, &ev, &button, &line, &col); + + is_int(line, 300, "mouse line for press SGR wide"); + is_int(col, 500, "mouse column for press SGR wide"); + termkey_destroy(tk); return exit_status(); -- cgit v1.2.3-70-g09d2