Use adjusted_pos when determining the token for tab completing

redirecitons, per #1296
This commit is contained in:
ridiculousfish 2014-05-03 00:15:13 -07:00
parent 60e94a4ec8
commit e530af1ff7

View file

@ -1981,7 +1981,7 @@ void complete(const wcstring &cmd_with_subcmds, std::vector<completion_t> &comps
bool in_redirection = false;
if (matching_arg_index == (size_t)(-1))
{
const parse_node_t *redirection = tree.find_node_matching_source_location(symbol_redirection, pos, plain_statement);
const parse_node_t *redirection = tree.find_node_matching_source_location(symbol_redirection, adjusted_pos, plain_statement);
in_redirection = (redirection != NULL);
}