Fix populating the stderr file, strip the coordinates of the error from it

This commit is contained in:
Frank LENORMAND 2015-12-15 11:13:04 +03:00
parent fee06e8889
commit bc3d04f111

View File

@ -36,7 +36,7 @@ main() {
exec gg exec gg
} }
hook global RuntimeError .+ %{ hook global RuntimeError .+ %{
nop %sh{echo '\$kak_hook_param' > stderr} nop %sh{echo \"\$kak_hook_param\" > stderr}
quit! quit!
} }
exec '$(cat cmd | sed -e s/\'/\\\\\'/g)' exec '$(cat cmd | sed -e s/\'/\\\\\'/g)'
@ -85,8 +85,11 @@ main() {
color=red color=red
number_failures=$(($number_failures + 1)) number_failures=$(($number_failures + 1))
fi fi
elif [ -s error -a ! $(cmp -s error stderr) ]; then else
color=yellow sed -ri 's/^[0-9]+:[0-9]+: //g' stderr
if [ -s error ] && ! cmp -s error stderr; then
color=yellow
fi
fi fi
echo "$indent$name" | colorize $color normal echo "$indent$name" | colorize $color normal