rc lint: When parsing lint messages, use "remove shortest prefix" pattern.

There might legitimately be "|" characters in the message, so
we want to stop at the first one, the one that delimits the message location
from the message text.
This commit is contained in:
Tim Allen 2020-02-13 20:19:03 +11:00
parent cad0572ca5
commit 48bd7387bb

View File

@ -357,7 +357,7 @@ define-command \
for lint_message; do
lineno="${lint_message%%|*}"
msg="${lint_message##*|}"
msg="${lint_message#*|}"
if [ "$lineno" -gt "$kak_cursor_line" ]; then
printf "execute-keys %dg\n" "$lineno"
@ -396,7 +396,7 @@ define-command \
for lint_message; do
lineno="${lint_message%%|*}"
msg="${lint_message##*|}"
msg="${lint_message#*|}"
if [ "$lineno" -ge "${kak_cursor_line}" ]; then
printf "execute-keys %dg\n" "$last_lineno"