From fc3826190a6480d8e45e05e22ca64c548e79e36a Mon Sep 17 00:00:00 2001 From: Joey Pabalinas Date: Tue, 6 Nov 2018 13:34:10 -1000 Subject: 43779 (tweaked): add parentheses to fix expression with cprecedences option set --- Functions/Zle/select-bracketed | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Functions/Zle') diff --git a/Functions/Zle/select-bracketed b/Functions/Zle/select-bracketed index d467bb804..0cb4d0e76 100644 --- a/Functions/Zle/select-bracketed +++ b/Functions/Zle/select-bracketed @@ -17,8 +17,8 @@ setopt localoptions noksharrays local style=${${1:-$KEYS}[1]} matching="(){}[]<>bbBB" local -i find=${NUMERIC:-1} idx=${matching[(I)[${${1:-$KEYS}[2]}]]}%9 (( idx )) || return 1 # no corresponding closing bracket -local lmatch=${matching[1 + (idx-1) & ~1]} -local rmatch=${matching[1 + (idx-1) | 1]} +local lmatch=${matching[1 + ((idx-1) & ~1)]} +local rmatch=${matching[1 + ((idx-1) | 1)]} local -i start=CURSOR+1 end=CURSOR+1 rfind=find [[ $BUFFER[start] = "$rmatch" ]] && (( start--, end-- )) -- cgit 1.4.1