You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add match-bracket widget that takes a position and/or parameter to store result, and does no weird vi stuff
I use this in my zle-line-pre-redraw hook,
local -a hackcol=(red cyan)
local mpos cpos off
for off in 0 1; do
(( cpos = CURSOR - off ))
if (( cpos >= 0 )) && zle .match-bracket $cpos mpos; then
region_highlight+=("$((cpos)) $((cpos+1)) bold,bg=${hackcol[2]},fg=black"
"$((mpos)) $((mpos+1)) bold,bg=${hackcol[1]},fg=black")
break
fi
done
0 commit comments