From 06fd04011950efdbcb14eead47fe73ec4c2194d6 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Wed, 25 Apr 2012 18:34:47 +0100 Subject: Bugfix to POSITION reporting - swap line<=>col --- driver-csi.c | 2 +- t/31position.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver-csi.c b/driver-csi.c index 0609e64..ddc2ac8 100644 --- a/driver-csi.c +++ b/driver-csi.c @@ -199,7 +199,7 @@ static TermKeyResult handle_csi_position(TermKey *tk, TermKeyKey *key, int cmd, return TERMKEY_RES_NONE; key->type = TERMKEY_TYPE_POSITION; - termkey_key_set_linecol(key, arg[0], arg[1]); + termkey_key_set_linecol(key, arg[1], arg[0]); return TERMKEY_RES_KEY; } diff --git a/t/31position.c b/t/31position.c index baefb8b..bb798c6 100644 --- a/t/31position.c +++ b/t/31position.c @@ -19,8 +19,8 @@ int main(int argc, char *argv[]) is_int(termkey_interpret_position(tk, &key, &line, &col), TERMKEY_RES_KEY, "interpret_position yields RES_KEY"); - is_int(line, 7, "line for position report"); - is_int(col, 15, "column for position report"); + is_int(line, 15, "line for position report"); + is_int(col, 7, "column for position report"); termkey_destroy(tk); -- cgit v1.2.3-70-g09d2