From 8e283f512acb74faef6f1760927e1ef4da1b5263 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 23 Dec 2022 15:37:39 +0900 Subject: Fix bind spec parser --- src/options.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/options.go') diff --git a/src/options.go b/src/options.go index 6eafa545..1fb649f2 100644 --- a/src/options.go +++ b/src/options.go @@ -938,7 +938,11 @@ Loop: break } // Keep + or , at the end - masked += strings.Repeat(" ", loc[1]-1) + action[loc[1]-1:loc[1]] + lastChar := action[loc[1]-1] + if lastChar == '+' || lastChar == ',' { + loc[1]-- + } + masked += strings.Repeat(" ", loc[1]) action = action[loc[1]:] } masked = strings.Replace(masked, "::", string([]rune{escapedColon, ':'}), -1) -- cgit v1.2.3