From cf97c91dbacd427896a50e24b2ed95bb7120c792 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Mon, 17 Oct 2016 07:36:14 +0200 Subject: [PATCH] *highlight: Use mend, don't manually check length of match (for $offset) --- hsmw-highlight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hsmw-highlight b/hsmw-highlight index 498cbd9..344cfe7 100644 --- a/hsmw-highlight +++ b/hsmw-highlight @@ -309,7 +309,7 @@ typeset -gA HSMW_HIGHLIGHT_STYLES integer offset=0 if [[ "$proc_buf" = (#b)(#s)(([[:space:]]|\\[[:space:]])##)* ]]; then # The first, outer parenthesis - offset="${#match[1]}" + offset="${mend[1]}" fi ((start_pos+=offset)) ((end_pos=$start_pos+${#arg}))