From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: feature/icomplete-vertical Date: Mon, 05 Oct 2020 08:45:55 +0300 Message-ID: <83blhhdy3w.fsf@gnu.org> References: <20200912133311.6ujtgczj6wyclufy@Ergus> <20200920130435.heye7bk73pm252km@Ergus> <83sgbczj0i.fsf@gnu.org> <83lfh4zfml.fsf@gnu.org> <838sd4z6lz.fsf@gnu.org> <20201001164804.mqqyxtet4ttweuyv@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10909"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ghe@sdf.org, spacibba@aol.com, juri@linkov.net, casouri@gmail.com, emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 05 07:47:13 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPJL7-0002jg-KQ for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 07:47:13 +0200 Original-Received: from localhost ([::1]:50032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPJL6-0002J0-Lj for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 01:47:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPJJt-0001sE-On for emacs-devel@gnu.org; Mon, 05 Oct 2020 01:45:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52914) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPJJs-00055s-Jw; Mon, 05 Oct 2020 01:45:56 -0400 Original-Received: from [176.228.60.248] (port=3494 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPJJr-0007fc-UF; Mon, 05 Oct 2020 01:45:56 -0400 In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Mon, 5 Oct 2020 00:47:39 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257074 Archived-At: > From: João Távora > Date: Mon, 5 Oct 2020 00:47:39 +0100 > Cc: Eli Zaretskii , Gregory Heytings , Yuan Fu , > emacs-devel , Juri Linkov > > (defun icomplete-vertical-adjust-minibuffer-height (completions) > (let* ((comp completions) > (complen (length (split-string comp "\n")))) > (if (> complen 1) (enlarge-window (- icomplete-prospects-height (1- (window-height))))) > comp)) > (advice-add 'icomplete-completions :filter-return #'icomplete-vertical-adjust-minibuffer-height) What happens with your solution if you need to enlarge the mini-window to a height that is greater than the frame's height?