diff options
author | Joey Pabalinas <joeypabalinas@gmail.com> | 2018-11-06 13:34:10 -1000 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2018-11-08 11:46:27 +0100 |
commit | fc3826190a6480d8e45e05e22ca64c548e79e36a (patch) | |
tree | f528505ed28e7e5ee9f0fd63759b202539aab0a1 | |
parent | 5a7070178826e7b0db94e0a3d285849315e5c5ab (diff) | |
download | zsh-fc3826190a6480d8e45e05e22ca64c548e79e36a.tar.gz zsh-fc3826190a6480d8e45e05e22ca64c548e79e36a.tar.xz zsh-fc3826190a6480d8e45e05e22ca64c548e79e36a.zip |
43779 (tweaked): add parentheses to fix expression with cprecedences option set
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Functions/Zle/select-bracketed | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 41a2f7aa9..72a74849e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2018-11-08 Oliver Kiddle <okiddle@yahoo.co.uk> + * 43779 (tweaked): Joey Pabalinas: Functions/Zle/select-bracketed: + add parentheses to fix expression with cprecedences option set + * 43805: Src/Modules/nearcolor.c, Src/prompt.c: make nearcolor module use the default colour rather than black as a fallback 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-- )) |