diff --git a/rc/clang.kak b/rc/clang.kak index 48b3f5a4..3b840d8d 100644 --- a/rc/clang.kak +++ b/rc/clang.kak @@ -15,7 +15,7 @@ def clang-complete %{ # displayed. ( pos=-:${kak_cursor_line}:${kak_cursor_column} - cd $(dirname ${kak_bufname}) + cd $(dirname ${kak_buffile}) output=$(clang++ -x c++ -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-at=${pos} - < ${kak_opt_clang_filename} |& tee /tmp/kak-clang-out | grep -E "^COMPLETION:[^:]+:" | perl -pe 's/^COMPLETION:[^:]+: +//; s/:/\\:/g; s/\[#.*?#\]|<#.*?#>(, *|\))?|\{#.*?#\}\)?//g') rm -r $(dirname ${kak_opt_clang_filename}) diff --git a/rc/cpp.kak b/rc/cpp.kak index 19b7dddc..d5825cc9 100644 --- a/rc/cpp.kak +++ b/rc/cpp.kak @@ -77,8 +77,8 @@ decl str-list alt_dirs ".;.." def alt %{ %sh{ shopt -s extglob alt_dirs=${kak_opt_alt_dirs//;/ } - file=$(basename ${kak_bufname}) - dir=$(dirname ${kak_bufname}) + file=$(basename ${kak_buffile}) + dir=$(dirname ${kak_buffile}) case ${file} in *.c|*.cc|*.cpp|*.cxx|*.C)