Drop an unreachable newline guard

'read' without '-d' stops at the first newline, so EXCMD never holds one, and a
newline inside the ':execute' string stays in the sandbox anyway.
This commit is contained in:
Junegunn Choi
2026-09-28 02:40:06 +09:00
parent ba458b129e
commit b1c03ea0ef
+1 -3
View File
@@ -34,9 +34,7 @@ fi
# as soon as an entry is highlighted. Sandboxed as a builtin tag jump is, so that
# it cannot run a shell command or touch a file. ':sandbox' on its own only covers
# the command up to the first '|', so hand the whole address to ':execute' as a
# string literal, doubling the quotes in it. A newline would end that line and
# leave the rest outside the sandbox, and no tags file holds one, so drop them
EXCMD=${EXCMD//$'\n'/ }
# string literal, doubling the quotes in it
EXCMD_LITERAL=${EXCMD//\'/\'\'}
CENTER="$("${VIMNAME}" -R -i NONE -u NONE -e -m -s "${FILE}" \
-c "set nomagic" \