Bugfix to POSITION reporting - swap line<=>col

This commit is contained in:
Paul LeoNerd Evans 2012-04-25 18:34:47 +01:00
parent ca4d98b0f7
commit 06fd040119
2 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ static TermKeyResult handle_csi_position(TermKey *tk, TermKeyKey *key, int cmd,
return TERMKEY_RES_NONE; return TERMKEY_RES_NONE;
key->type = TERMKEY_TYPE_POSITION; 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; return TERMKEY_RES_KEY;
} }

View File

@ -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(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(line, 15, "line for position report");
is_int(col, 15, "column for position report"); is_int(col, 7, "column for position report");
termkey_destroy(tk); termkey_destroy(tk);