1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-25 12:36:11 +03:00

Fix arbitrary keys execution in the doc command

This commit is contained in:
Frank LENORMAND 2016-04-12 10:41:16 +03:00
parent 55d381999e
commit 82a3f10a82

View File

@ -18,7 +18,8 @@ def -hidden -params 1..2 _doc-open %{
"
if [ $# -gt 1 ]; then
echo "try %{ exec '%<a-s><a-k>(?i)^\h+[^\n]*?\Q${2}\E<ret>\'' } catch %{ exec <space>gg }"
needle=$(printf %s "$2" | sed 's,<,<lt>,g')
echo "try %{ exec '%<a-s><a-k>(?i)^\h+[^\n]*?\Q${needle}\E<ret>\'' } catch %{ exec <space>gg }"
fi
else
echo "echo -color Error %{doc '$@' failed: see *debug* buffer for details}"