From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#18195: 24.3.92; window-screen-lines is not accurate Date: Tue, 05 Aug 2014 14:03:37 +0400 Message-ID: <53E0ABF9.7070506@yandex.ru> References: <86tx5r7l1j.fsf@yandex.ru> <53E097F7.5050407@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407233075 20593 80.91.229.3 (5 Aug 2014 10:04:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2014 10:04:35 +0000 (UTC) To: martin rudalics , 18195@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 05 12:04:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XEbbR-0003gi-U2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 12:04:22 +0200 Original-Received: from localhost ([::1]:58342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEbbR-0004ug-IN for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 06:04:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEbbH-0004o9-Tm for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 06:04:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEbb8-0002gB-Gd for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 06:04:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEbb8-0002g5-C4 for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 06:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XEbb7-0002sd-Nc for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 06:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2014 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18195-submit@debbugs.gnu.org id=B18195.140723303211053 (code B ref 18195); Tue, 05 Aug 2014 10:04:01 +0000 Original-Received: (at 18195) by debbugs.gnu.org; 5 Aug 2014 10:03:52 +0000 Original-Received: from localhost ([127.0.0.1]:58289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEbax-0002sC-JJ for submit@debbugs.gnu.org; Tue, 05 Aug 2014 06:03:52 -0400 Original-Received: from mail-lb0-f173.google.com ([209.85.217.173]:37281) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEbau-0002rs-Is for 18195@debbugs.gnu.org; Tue, 05 Aug 2014 06:03:49 -0400 Original-Received: by mail-lb0-f173.google.com with SMTP id p9so527704lbv.32 for <18195@debbugs.gnu.org>; Tue, 05 Aug 2014 03:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=L7IW1Hh+QLjEieU7/J8CFyZfODbNfvlzSwHEFTzAN6I=; b=RtM9W3xpeR2g3aZaoEcHWmrSrlMEA1kv7gJGwaVHaVcfDyUG/KMROfkRVAx5g9uJpc 7CPldz8S7OyvM+9ODbsrNHTzzSuV9rQJraPvZf6NNXEAA95hFMb/3n8UB318CPgvCOR2 rTW7sHCq21gs2aVYcJmAPonLS1UrsGgpw9Xwnnvbe7ebjwj18ChO2oNegtWsO7CoYD0j 4niBhwXJ2VUnRUUC5KD03ieiqR5YKjWIPn35vF3oYZIcPBmViphqG2pf2+CFIaKVaL0J /WbbCe1pXZzGYZ3mSd9HgmkoTF4US19S4S8g2sbKanknqJK9vOTQ+KYOvp4b9eEZdIZt kkAA== X-Received: by 10.152.180.36 with SMTP id dl4mr2956080lac.26.1407233022451; Tue, 05 Aug 2014 03:03:42 -0700 (PDT) Original-Received: from [10.8.0.26] (v-2-eu19-d3962-07.webazilla.com. [78.140.151.7]) by mx.google.com with ESMTPSA id f2sm2010385lbo.2.2014.08.05.03.03.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Aug 2014 03:03:41 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <53E097F7.5050407@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92124 Archived-At: On 08/05/2014 12:38 PM, martin rudalics wrote: > IIUC > > https://github.com/company-mode/company-mode/issues/160#issuecomment-51022508 > > mentioned in that thread, all you want is to display all lines of a > completion buffer. Is that correct? Not at all. Have you tried Company? This issue is about completion popup, which displays completions in the current buffer and window, in a rectangle rendered using an overlay. There are screenshots in that issue thread. Before the popup is rendered, we need to determine how much of it would fit below the current line, and if there's not enough space, we render it above the current line. Even if the buffer is shorter than the window, we can temporarily pad it, so when calculating the height of the window, we need to take the whole of it into account. That's why `count-screen-line' doesn't seem like a good approach either.