Do not escape completions in completer functions let the client decide
Fixes #231
This commit is contained in:
parent
0cdcdb8b03
commit
2e2812b10f
|
@ -124,9 +124,9 @@ CandidateList BufferManager::complete_buffer_name(StringView prefix,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefix_match(match_name, real_prefix))
|
if (prefix_match(match_name, real_prefix))
|
||||||
result.push_back(escape(name));
|
result.push_back(name);
|
||||||
if (subsequence_match(name, real_prefix))
|
if (subsequence_match(name, real_prefix))
|
||||||
subsequence_result.push_back(escape(name));
|
subsequence_result.push_back(name);
|
||||||
}
|
}
|
||||||
return result.empty() ? subsequence_result : result;
|
return result.empty() ? subsequence_result : result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,9 +187,9 @@ CandidateList ClientManager::complete_client_name(StringView prefix,
|
||||||
const String& name = client->context().name();
|
const String& name = client->context().name();
|
||||||
|
|
||||||
if (prefix_match(name, real_prefix))
|
if (prefix_match(name, real_prefix))
|
||||||
result.push_back(escape(name));
|
result.push_back(name);
|
||||||
if (subsequence_match(name, real_prefix))
|
if (subsequence_match(name, real_prefix))
|
||||||
subsequence_result.push_back(escape(name));
|
subsequence_result.push_back(name);
|
||||||
}
|
}
|
||||||
return result.empty() ? subsequence_result : result;
|
return result.empty() ? subsequence_result : result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,7 +309,7 @@ std::vector<String> complete_filename(StringView prefix,
|
||||||
};
|
};
|
||||||
std::vector<String> res = list_files(fileprefix, dirname, filter);
|
std::vector<String> res = list_files(fileprefix, dirname, filter);
|
||||||
for (auto& file : res)
|
for (auto& file : res)
|
||||||
file = escape(dirname + file);
|
file = dirname + file;
|
||||||
std::sort(res.begin(), res.end());
|
std::sort(res.begin(), res.end());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user