From 48bd7387bbe903b2aaf97a994255cd2da23d8643 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Thu, 13 Feb 2020 20:19:03 +1100 Subject: [PATCH] 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. --- rc/tools/lint.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/tools/lint.kak b/rc/tools/lint.kak index 91404336..d24633bb 100644 --- a/rc/tools/lint.kak +++ b/rc/tools/lint.kak @@ -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"