diff options
| author | Tim Allen <screwtape@froup.com> | 2020-02-13 20:19:03 +1100 |
|---|---|---|
| committer | Tim Allen <screwtape@froup.com> | 2020-02-13 20:27:24 +1100 |
| commit | 48bd7387bbe903b2aaf97a994255cd2da23d8643 (patch) | |
| tree | d43f7b37aaeb02ec8f437edc1b46175cf60936b4 | |
| parent | cad0572ca52f0ac206b574b5445ddbcdcc25742f (diff) | |
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.
| -rw-r--r-- | rc/tools/lint.kak | 4 |
1 files 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" |
