aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-04-24 15:25:17 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-04-24 15:25:17 +0100
commitf33513282a2fb5e55101ef1e0c8d4387d351e42d (patch)
tree8a944b520e4d6d0ee816cc69e883c590e9d96676 /termkey.c
parent3b3a7c2f45ad99e66487c503668865711d368210 (diff)
downloadtermo-f33513282a2fb5e55101ef1e0c8d4387d351e42d.tar.gz
termo-f33513282a2fb5e55101ef1e0c8d4387d351e42d.tar.xz
termo-f33513282a2fb5e55101ef1e0c8d4387d351e42d.zip
Created abstract accessors for getting/setting key event line/col counts
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/termkey.c b/termkey.c
index 6664151..ade90a8 100644
--- a/termkey.c
+++ b/termkey.c
@@ -911,11 +911,7 @@ TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKe
if(button)
*button = 0;
- if(col)
- *col = (unsigned char)key->code.mouse[1] | ((unsigned char)key->code.mouse[3] & 0x0f) << 8;
-
- if(line)
- *line = (unsigned char)key->code.mouse[2] | ((unsigned char)key->code.mouse[3] & 0x70) << 4;
+ termkey_key_get_linecol(key, line, col);
if(!event)
return TERMKEY_RES_KEY;