Fix potential bug in clang.kak

This commit is contained in:
Maxime Coste 2017-10-08 11:20:07 +08:00
parent 079cfbc6ac
commit 397e5ef0e1

View File

@ -163,7 +163,7 @@ def clang-diagnostics-next -docstring "Jump to the next line that contains an er
printf "%s\n" "${kak_opt_clang_errors}" | sed -e 's/\([^\\]\):/\1\n/g' | tail -n +2 | ( printf "%s\n" "${kak_opt_clang_errors}" | sed -e 's/\([^\\]\):/\1\n/g' | tail -n +2 | (
while IFS='|' read candidate rest; do while IFS='|' read candidate rest; do
first_line=${first_line-$candidate} first_line=${first_line-$candidate}
if [ $candidate -gt $kak_cursor_line ]; then if [ "$candidate" -gt $kak_cursor_line ]; then
line=$candidate line=$candidate
break break
fi fi