From aa17f0db6d4dc751a636ca150f9b7942da3f6885 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 16 May 2000 10:45:01 +0000 Subject: fix scrolling in menu-selection with matches spanning multiple lines --- Completion/Core/_expand | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Core/_expand b/Completion/Core/_expand index 987a597c7..8bf6d11f4 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -108,9 +108,17 @@ if [[ -z "$compstate[insert]" ]] ;then else _tags all-expansions expansions original - _requested all-expansions expl 'all expansions' && - compadd "$expl[@]" -UQ -qS "$suf" - "$exp" + if _requested all-expansions expl 'all expansions'; then + local disp dstr + if [[ $#exp -ge COLUMNS ]]; then + disp=( -ld dstr ) + dstr=( "${(r:COLUMNS-5:)exp} ..." ) + else + disp=() + fi + compadd "$disp[@]" "$expl[@]" -UQ -qS "$suf" - "$exp" + fi if [[ $#exp -gt 1 ]] && _requested expansions; then local i normal dir -- cgit 1.4.1