diff options
Diffstat (limited to 'lib/readline/complete.c')
-rw-r--r-- | lib/readline/complete.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/readline/complete.c b/lib/readline/complete.c index 2016d393..ce9b8cd0 100644 --- a/lib/readline/complete.c +++ b/lib/readline/complete.c @@ -1630,7 +1630,7 @@ rl_display_match_list (char **matches, int len, int max) if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count) { lines = _rl_internal_pager (lines); - if (lines < 0) + if (lines < 0 || _rl_complete_display_matches_interrupt) return; } } @@ -1658,7 +1658,7 @@ rl_display_match_list (char **matches, int len, int max) if (_rl_page_completions && lines >= _rl_screenheight - 1) { lines = _rl_internal_pager (lines); - if (lines < 0) + if (lines < 0 || _rl_complete_display_matches_interrupt) return; } } @@ -1745,7 +1745,9 @@ display_matches (char **matches) } } - rl_display_match_list (matches, len, max); + /* We rely on the caller to set MATCHES to 0 when this returns. */ + if (_rl_complete_display_matches_interrupt == 0) + rl_display_match_list (matches, len, max); rl_forced_update_display (); rl_display_fixed = 1; |