go back to : as set/list separator in options
This commit is contained in:
parent
d29fb6f2c4
commit
38c7197770
|
@ -554,7 +554,7 @@ static BufferCompletion complete_opt(const Buffer& buffer,
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
auto& desc = opt[0];
|
auto& desc = opt[0];
|
||||||
static const Regex re(R"((\d+):(\d+)(?:\+(\d+))?@(\d+))");
|
static const Regex re(R"((\d+)\.(\d+)(?:\+(\d+))?@(\d+))");
|
||||||
boost::smatch match;
|
boost::smatch match;
|
||||||
if (boost::regex_match(desc.begin(), desc.end(), match, re))
|
if (boost::regex_match(desc.begin(), desc.end(), match, re))
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ inline void option_from_string(const String& str, bool& opt)
|
||||||
throw runtime_error("boolean values are either true, yes, false or no");
|
throw runtime_error("boolean values are either true, yes, false or no");
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Codepoint list_separator = ';';
|
constexpr Codepoint list_separator = ':';
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
String option_to_string(const std::vector<T>& opt)
|
String option_to_string(const std::vector<T>& opt)
|
||||||
|
|
|
@ -17,11 +17,11 @@ def clang-complete %{
|
||||||
pos=-:${kak_cursor_line}:${kak_cursor_column}
|
pos=-:${kak_cursor_line}:${kak_cursor_column}
|
||||||
cd $(dirname ${kak_bufname})
|
cd $(dirname ${kak_bufname})
|
||||||
output=$(clang++ -x c++ -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-at=${pos} - < ${kak_opt_clang_filename} |
|
output=$(clang++ -x c++ -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-at=${pos} - < ${kak_opt_clang_filename} |
|
||||||
grep -E "^COMPLETION:[^:]+:" | perl -pe 's/^COMPLETION:[^:]+: +//; s/\[#.*?#\]|<#.*?#>(, *|\))?|\{#.*?#\}\)?//g')
|
grep -E "^COMPLETION:[^:]+:" | perl -pe 's/^COMPLETION:[^:]+: +//; s/:/\\:/g; s/\[#.*?#\]|<#.*?#>(, *|\))?|\{#.*?#\}\)?//g')
|
||||||
rm -r $(dirname ${kak_opt_clang_filename})
|
rm -r $(dirname ${kak_opt_clang_filename})
|
||||||
completions="${kak_cursor_line}:${kak_cursor_column}@${kak_timestamp}"
|
completions="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}"
|
||||||
for cmp in ${output}; do
|
for cmp in ${output}; do
|
||||||
completions="${completions};${cmp}"
|
completions="${completions}:${cmp}"
|
||||||
done
|
done
|
||||||
echo "eval -client $kak_client %[ echo completed; setb completions '${completions}' ]" | socat -u stdin UNIX-CONNECT:${kak_socket}
|
echo "eval -client $kak_client %[ echo completed; setb completions '${completions}' ]" | socat -u stdin UNIX-CONNECT:${kak_socket}
|
||||||
) >& /dev/null < /dev/null &
|
) >& /dev/null < /dev/null &
|
||||||
|
|
Loading…
Reference in New Issue
Block a user