From 38c7197770cee9b179dc3f406f3e19436ae9a73f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 24 Jul 2013 22:41:41 +0200 Subject: [PATCH] go back to : as set/list separator in options --- src/input_handler.cc | 2 +- src/option_types.hh | 2 +- src/rc/clang.kak | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index bdee3b2b..1f947b66 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -554,7 +554,7 @@ static BufferCompletion complete_opt(const Buffer& buffer, return {}; 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; if (boost::regex_match(desc.begin(), desc.end(), match, re)) { diff --git a/src/option_types.hh b/src/option_types.hh index df2295ce..9c07a6c1 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -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"); } -constexpr Codepoint list_separator = ';'; +constexpr Codepoint list_separator = ':'; template String option_to_string(const std::vector& opt) diff --git a/src/rc/clang.kak b/src/rc/clang.kak index 394e3819..22571b25 100644 --- a/src/rc/clang.kak +++ b/src/rc/clang.kak @@ -17,11 +17,11 @@ def clang-complete %{ pos=-:${kak_cursor_line}:${kak_cursor_column} cd $(dirname ${kak_bufname}) 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}) - completions="${kak_cursor_line}:${kak_cursor_column}@${kak_timestamp}" + completions="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}" for cmp in ${output}; do - completions="${completions};${cmp}" + completions="${completions}:${cmp}" done echo "eval -client $kak_client %[ echo completed; setb completions '${completions}' ]" | socat -u stdin UNIX-CONNECT:${kak_socket} ) >& /dev/null < /dev/null &