Skip to content

Commit

Permalink
complete: fix a bug that menu-filter is only partially turned off by …
Browse files Browse the repository at this point in the history
…"complete_menu_filter"
  • Loading branch information
akinomyoga committed Apr 10, 2020
1 parent ea2fa8e commit 7278e27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core-complete.sh
Expand Up @@ -2904,7 +2904,7 @@ function ble/widget/complete {
if [[ $_ble_complete_menu_active && :$opts: != *:regenerate:* &&
:$opts: != *:context=*:* && ${#_ble_complete_menu_items[@]} -gt 0 ]]
then
if [[ $_ble_complete_menu_filter_enabled ]] || {
if [[ $_ble_complete_menu_filter_enabled && $bleopt_complete_menu_filter ]] || {
ble/complete/menu-filter; local ext=$?
((ext==148)) && return 148
((ext==0)); }; then
Expand Down Expand Up @@ -3160,7 +3160,7 @@ function ble/highlight/layer:menu_filter/update {

# determine range
local beg= end= ret
if [[ $_ble_complete_menu_active && ${#_ble_complete_menu_items[@]} -gt 0 ]]; then
if [[ $bleopt_complete_menu_filter && $_ble_complete_menu_active && ${#_ble_complete_menu_items[@]} -gt 0 ]]; then
ble/complete/menu-filter/.get-filter-target && local str=$ret &&
ble/complete/menu/get-active-range "$str" "$_ble_edit_ind" &&
[[ ${str:beg:end-beg} != "${_ble_complete_menu0_comp[2]}" ]] || beg= end=
Expand Down

0 comments on commit 7278e27

Please sign in to comment.