From 9c6f46a808d3570750912c8d7e1c624380a20225 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 26 Oct 2022 15:26:39 +0200 Subject: [PATCH] highlighter: remove redundant check if we can do io It's done a few lines above. --- src/highlight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highlight.cpp b/src/highlight.cpp index 89218f84d..a67f2a447 100644 --- a/src/highlight.cpp +++ b/src/highlight.cpp @@ -1012,7 +1012,7 @@ void highlighter_t::visit(const ast::argument_t &arg, bool cmd_is_cd, bool optio if (expand_one(param, expand_flag::skip_cmdsubst, ctx)) { bool is_help = string_prefixes_string(param, L"--help") || string_prefixes_string(param, L"-h"); - if (!is_help && this->io_ok && + if (!is_help && !is_potential_cd_path(param, working_directory, ctx, PATH_EXPAND_TILDE)) { this->color_node(arg, highlight_role_t::error); }