Skip to content

Commit

Permalink
highlight: fix a bug that region is not cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Apr 4, 2019
1 parent c184fc8 commit f59fdaf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ble-color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,13 @@ function ble-highlight-layer:region/update {

# 変更がない時はそのまま通過
if ((DMIN<0)); then
[[ $sgr == $osgr ]] &&
[[ ${selection[*]} == ${_ble_highlight_layer_region_osel[*]} ]] &&
PREV_BUFF=_ble_highlight_layer_region_buff
if [[ $sgr == $osgr && ${selection[*]} == ${_ble_highlight_layer_region_osel[*]} ]]; then
[[ ${selection[*]} ]] && PREV_BUFF=_ble_highlight_layer_region_buff
return 0
fi
else
[[ ! ${selection[*]} && ! ${_ble_highlight_layer_region_osel[*]} ]]
fi && return 0
[[ ! ${selection[*]} && ! ${_ble_highlight_layer_region_osel[*]} ]] && return 0
fi

local umin=-1 umax=-1
if ((rlen)); then
Expand Down

0 comments on commit f59fdaf

Please sign in to comment.