Do not escape completions in completer functions let the client decide

Fixes #231
This commit is contained in:
Maxime Coste 2014-08-18 23:31:02 +01:00
parent 0cdcdb8b03
commit 2e2812b10f
3 changed files with 5 additions and 5 deletions

View File

@ -124,9 +124,9 @@ CandidateList BufferManager::complete_buffer_name(StringView prefix,
}
if (prefix_match(match_name, real_prefix))
result.push_back(escape(name));
result.push_back(name);
if (subsequence_match(name, real_prefix))
subsequence_result.push_back(escape(name));
subsequence_result.push_back(name);
}
return result.empty() ? subsequence_result : result;
}

View File

@ -187,9 +187,9 @@ CandidateList ClientManager::complete_client_name(StringView prefix,
const String& name = client->context().name();
if (prefix_match(name, real_prefix))
result.push_back(escape(name));
result.push_back(name);
if (subsequence_match(name, real_prefix))
subsequence_result.push_back(escape(name));
subsequence_result.push_back(name);
}
return result.empty() ? subsequence_result : result;
}

View File

@ -309,7 +309,7 @@ std::vector<String> complete_filename(StringView prefix,
};
std::vector<String> res = list_files(fileprefix, dirname, filter);
for (auto& file : res)
file = escape(dirname + file);
file = dirname + file;
std::sort(res.begin(), res.end());
return res;
}