From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#27427: 26.0.50; Native line numbers lead to display error in company-mode popup Date: Wed, 21 Jun 2017 16:04:58 +0300 Message-ID: <6aa4616d-79f7-db1b-c048-076a9a48596f@yandex.ru> References: <611468a0-3115-813a-7347-d0c06e155831@web.de> <83vanrx5uo.fsf@gnu.org> <362a7d18-7f05-2e99-f8b3-41c353cf234f@yandex.ru> <83h8zawvih.fsf@gnu.org> <00f59a24-2d80-ca47-b6f3-3d219aa5aa3f@yandex.ru> <8360fqvz9x.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1498051563 8942 195.159.176.226 (21 Jun 2017 13:26:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Jun 2017 13:26:03 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0 Cc: alexanderm@web.de, 27427@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 21 15:25:59 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfdv-000253-AP for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jun 2017 15:25:59 +0200 Original-Received: from localhost ([::1]:53969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfe0-0007N4-8N for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jun 2017 09:26:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfKi-0005Tl-Q2 for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 09:06:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfKd-0003Xc-2Z for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 09:06:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56291) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNfKc-0003XT-UU for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dNfKc-0006dN-GB for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 09:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jun 2017 13:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27427 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27427-submit@debbugs.gnu.org id=B27427.149805030925443 (code B ref 27427); Wed, 21 Jun 2017 13:06:02 +0000 Original-Received: (at 27427) by debbugs.gnu.org; 21 Jun 2017 13:05:09 +0000 Original-Received: from localhost ([127.0.0.1]:58968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfJl-0006cJ-85 for submit@debbugs.gnu.org; Wed, 21 Jun 2017 09:05:09 -0400 Original-Received: from mail-lf0-f45.google.com ([209.85.215.45]:33132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfJk-0006c7-8c for 27427@debbugs.gnu.org; Wed, 21 Jun 2017 09:05:08 -0400 Original-Received: by mail-lf0-f45.google.com with SMTP id m77so94956171lfe.0 for <27427@debbugs.gnu.org>; Wed, 21 Jun 2017 06:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sLfqTpd6jmRS3oXae+HQoIR6vqz7S/MNw3D/64wVUbc=; b=nv0X3IQvhP9hkYebPDLN5C6TdSMSKNde2l1iSNfmgUwpEFZ6/CKZGlHX3hwxDqz7QS tWwry06MFRc+BuIgTCJjZBK1zCRsWnKsRZDIky5LnxILnS7TPm1epctGpv+OCiaYoAhf PZgOidp8vRK6V8HiEGZOFgIie0NqNheNbgu19UTyDz0bLoshYg4i5O3NYmyn0GMM8TJ6 IJIw6f9f1ForKr4oe1Uw1HnK5pk0OHcCV6VugJgNUm+WtQanWeDNYIrx0UHzvbWbLMT4 G4warap7m+lXRJYMVoDNVvjTwcO4tqWzIGU0rDPD/3jWb8C3R6zNw5h1cpRf3ZACAgsa V3aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sLfqTpd6jmRS3oXae+HQoIR6vqz7S/MNw3D/64wVUbc=; b=hEPDGPQ2o4zaBWbCdJKHZne/Z3IN3lywrn1af13CxtyVJKPRYZ2SY1kE9lsmcg65W1 MrVUmuGhYGqXCp3kSxQTBERdNuK1YM2+Gi/pg01s7DqEcqdeLbLH1hoLtWOCqV5uzO2N atExafyPBthR3S7J2hDtJiNOqTy7M+JUaLfSulIdLHBHLduxliUX8L10Hx5zffosMsjL vVwrp6/lihPdNBSfC4EcjRdlITpoZcUZIBs1AHWm48S64fH1uGAt9dC5aqD8W0Iq3rLW rghJPvipztcFDvbp8TvD9X8V8MlyIxqsORspXUzfq+2wX+fI+WfGoQkLtEPQYorRKWHP dOZw== X-Gm-Message-State: AKS2vOw0mshAFe6FhXVsG8yivM4NL3Gfne1n5AsWfV3/9Hp6kl4zbkOY F0Pg/AKOPiwPAONueUg= X-Received: by 10.80.169.82 with SMTP id m18mr25325422edc.31.1498050302068; Wed, 21 Jun 2017 06:05:02 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id f22sm8436526edf.59.2017.06.21.06.04.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 06:05:00 -0700 (PDT) In-Reply-To: <8360fqvz9x.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:133796 Archived-At: On 6/21/17 5:40 AM, Eli Zaretskii wrote: >> When the position at bol is interpreted as "column 3", all lines of the >> rectangle are rendered starting with the fourth character of each line. > > So this is the root cause of the problem. Is there a reason not to > start rendering from the character whose posn-col-row is 3? How? Does that mean I'll have to call posn-at-point twice now? Once for point, and once for beginning-of-visual-line? Even that won't solve all the rendering issues. In my testing, the first line of the popup is not at the same column as the rest of them. Probably because of the `line-prefix' property on the overlay which I explained in the previous email. And we can't stop putting it there because we don't have a better solution for the `line-prefix' text property. I _guess_ I could reorganize the code and track whether the current line is the first, and render that line of the popup with a different offset... Doesn't sound great, to be honest. That's an extra piece of complexity. Even so, I'm not sure this will be the end of it. Setting line-prefix doesn't seem to be an accurate model of the problem company popup has with native line numbering: - The image in the report shows the first line of the popup being "rendered" at a higher column than the rest. The rest are basically positioned fine. - In my testing, with (setq line-prefix "..."), it's the opposite. The first line of the popup is positioned correctly, while the rest are shifted to the right by 3 columns.