mirror of git://git.code.sf.net/p/zsh/code
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 donemikachu/redrawhook
parent
8ab150a867
commit
72f7f904e8
Loading…
Reference in New Issue