aboutsummaryrefslogtreecommitdiffhomepage
path: root/highlight.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-11-26 23:56:47 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-11-26 23:56:47 -0800
commit84483b4aac7cfd5d59b5a1050f5d11a5f052af50 (patch)
treedf54371294a92fe74b49a46f53344737ec6790f5 /highlight.cpp
parent9f5547327e3710303d3cb40b4bc55e74653a70ee (diff)
Fix for process expansion off the main thread in syntax highlighting
(#1143)
Diffstat (limited to 'highlight.cpp')
-rw-r--r--highlight.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/highlight.cpp b/highlight.cpp
index 8d46feb3..2e154387 100644
--- a/highlight.cpp
+++ b/highlight.cpp
@@ -710,7 +710,7 @@ static bool autosuggest_parse_command(const wcstring &str, wcstring *out_command
{
/* Command. First check that the command actually exists. */
wcstring local_cmd = tok_last(&tok);
- bool expanded = expand_one(cmd, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_VARIABLES);
+ bool expanded = expand_one(cmd, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_VARIABLES | EXPAND_SKIP_JOBS);
if (! expanded || has_expand_reserved(cmd.c_str()))
{
/* We can't expand this cmd, ignore it */
@@ -873,7 +873,7 @@ bool autosuggest_validate_from_history(const history_item_t &item, file_detectio
{
/* We can possibly handle this specially */
wcstring dir = parsed_arguments.back();
- if (expand_one(dir, EXPAND_SKIP_CMDSUBST))
+ if (expand_one(dir, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_JOBS))
{
handled = true;
bool is_help = string_prefixes_string(dir, L"--help") || string_prefixes_string(dir, L"-h");
@@ -997,7 +997,7 @@ static void tokenize(const wchar_t * const buff, std::vector<int> &color, const
if (cmd == L"cd")
{
wcstring dir = tok_last(&tok);
- if (expand_one(dir, EXPAND_SKIP_CMDSUBST))
+ if (expand_one(dir, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_JOBS))
{
int is_help = string_prefixes_string(dir, L"--help") || string_prefixes_string(dir, L"-h");
if (!is_help && ! is_potential_cd_path(dir, working_directory, PATH_EXPAND_TILDE, NULL))
@@ -1182,7 +1182,7 @@ static void tokenize(const wchar_t * const buff, std::vector<int> &color, const
case TOK_STRING:
{
target_str = tok_last(&tok);
- if (expand_one(target_str, EXPAND_SKIP_CMDSUBST))
+ if (expand_one(target_str, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_JOBS))
{
target = target_str.c_str();
}