Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: Delaying menu completion




> }    _is_completing() {
> }      [[ $compstate[old_list] == shown ]] && _completing=1
> }    }
> }    zle -C is-completing complete-word _is_completing
>
> I'd suggest
>    _is_completing() {
>      _completing=$compstate[old_list]
>      compstate[old_list]=keep
>    }
>
> The end result is probably the same, but keeping the old list will mean
> that `zle menu-complete' doesn't have to recompute it.  (I'm actually
> not entirely sure what happens to the list when you invoke a completion
> widget from another zle widget, but the doc implies it'll be cleared
> when the completion widget finishes if old_list is not keep.)

That would all seem to tie in with what I've observed. Certainly making the
change you suggested stopped the list from being redrawn.

> Also, setting old_list to keep causes the widget to correctly propagate
> its exit status, should you end up wanting to test `if zle is-completing'
> again at some point.

This bit didn't seem to work, but it doesn't matter anyhow.

Cheers,

Martin



Messages sorted by: Reverse Date, Date, Thread, Author