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

Re: Is it possible to limit the height or rows of menus?



On 2020-04-05 22:29,
Dave Woodfall <dave@xxxxxxx> put forth the proposition:
> Now when I get to the end and cycle back to the top, the prompt goes
> up and overwrites the previous line.
>
> This is what I'm using:
>
> zle -N _vi-tab
>
> _vi-tab() {
>   LINES=15 zle complete-word
>   }
>
> bindkey '\t' _vi-tab

Turning off show-completer fixed the problem with lines being eaten,
and doing a zle -R help clean up the prompt.  I also turned off
predict messages to be on the safe side.

_vi-tab() {
  zstyle ':predict' verbose false
  local OLDLINES=$LINES
  LINES=15
  zle complete-word
  zle -R
  local LINES=$OLDLINES
}

--
Dave

The antibloat squad!
For those interested in no bloat, minimal desktop Linux
gopher://tty1.uk/1/?minimal-linux
http://tty1.uk/minimal-linux
#minimallinux @ chat.freenode.net



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