mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-24 05:41:14 -03:00
Syntax highlighting now correctly handles cd
This commit is contained in:
@@ -936,3 +936,17 @@ parse_node_tree_t::parse_node_list_t parse_node_tree_t::find_nodes(const parse_n
|
||||
find_nodes_recursive(*this, parent, type, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
bool parse_node_tree_t::argument_list_is_root(const parse_node_t &node) const
|
||||
{
|
||||
bool result = true;
|
||||
assert(node.type == symbol_argument_list || node.type == symbol_arguments_or_redirections_list);
|
||||
const parse_node_t *parent = this->get_parent(node);
|
||||
if (parent != NULL)
|
||||
{
|
||||
/* We have a parent - check to make sure it's not another list! */
|
||||
result = parent->type != symbol_arguments_or_redirections_list && parent->type != symbol_argument_list;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user