From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61361: cursor cannot be at the start of overlay that starts with a newline Date: Wed, 8 Feb 2023 17:16:40 +0200 Message-ID: <05087da5-30d3-dbb5-1dd7-70acf050b37d@yandex.ru> References: <83o7q4nw2s.fsf@gnu.org> <83k00snqhp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7970"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 61361@debbugs.gnu.org To: Eli Zaretskii , Xinyang Chen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 08 16:17:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pPmCC-0001uO-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Feb 2023 16:17:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPmC0-0003xa-Cm; Wed, 08 Feb 2023 10:17:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPmBy-0003xM-HL for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 10:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPmBy-0000fw-8U for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 10:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPmBy-0002tv-0C for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 10:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Feb 2023 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 61361-submit@debbugs.gnu.org id=B61361.167586940911129 (code B ref 61361); Wed, 08 Feb 2023 15:17:01 +0000 Original-Received: (at 61361) by debbugs.gnu.org; 8 Feb 2023 15:16:49 +0000 Original-Received: from localhost ([127.0.0.1]:56328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPmBl-0002tR-A3 for submit@debbugs.gnu.org; Wed, 08 Feb 2023 10:16:49 -0500 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:40859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPmBj-0002tC-DY for 61361@debbugs.gnu.org; Wed, 08 Feb 2023 10:16:47 -0500 Original-Received: by mail-ej1-f53.google.com with SMTP id rp23so906355ejb.7 for <61361@debbugs.gnu.org>; Wed, 08 Feb 2023 07:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=G9+hjc53sp/loGFaGW9gs7/8u15IuV1tzd6yCcGw6Mc=; b=SvgaQzwQikFOtph5zJUDH6czQc4KGfPkksKGMXpEopIm6qBJXs55RHWe8Hbd1SWldy G5Q8j36cUNlcxIlvfWcn6F7oAZ/NNNhxsuCyygMnmnMjbpyOZyKfJFsneLhMxjLGMsah hYb7aJ/U4ga75ZKwhHcsGOIrZhEyu+cURfkcpdDVqBH5lQg8q8+ilfIIIAR48OJtSYeD wVsSoLIzTOQIqjjDZAz5otM/9AmXRm6vV/XVyUBd6StcTChRFIDLdWNdIT2E9HUH/W4Q tPPkMDBLSivcHe8z3pBiHiHNpGQsmbC96N7dg8z6jbkX+DnJYKzs+igfpOG6SftaWKVx b4GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G9+hjc53sp/loGFaGW9gs7/8u15IuV1tzd6yCcGw6Mc=; b=O2CGFaT9Sf7Fsnj3Bk+07E/Tq56X6R1PtTpQikAayoHgDBFiP4fEdxxccPUR8H4oJc LTY5PSXC1vmFbsNjI/neCXAwKx+ggUC3JLDOmEBiHkUkgRgI0t0t94EnMiHv0Mwkpji2 MQuKbJVVmJxFNbRoIXzqywAcfxBvI9B3J9vzoSjG5IdJEAIdDua20aLo16MLSFv3om5u YcVuMzYK5Xq1cUvLvzfuoR1gnDhYLbvDXN+1jxyKDcdpTsqBWhH+SToD0NQYSBOwM36H wtiZGjbrN/+QidlH/jcttNEYpUiNu+dZ9HqKkPjAiEu6iM14B8j+F1ibgKC2V0/gbyKQ RxzA== X-Gm-Message-State: AO0yUKWwVji/p5KwNU7a182lhz046zA3gApmMCqyp2MvjWxt6sysiPjp TlDRnH7zjUkiGm4G5rfvHd8= X-Google-Smtp-Source: AK7set9WrKaajRw3RCs7gFZXHSYDiLDQ1nGdbwLHsiOQqumC9D96prLtxj52cbflPRzMJDfrzXwKkA== X-Received: by 2002:a17:907:7f87:b0:8ae:707:e129 with SMTP id qk7-20020a1709077f8700b008ae0707e129mr3227790ejc.19.1675869401920; Wed, 08 Feb 2023 07:16:41 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id fp3-20020a1709069e0300b008aea5e0938esm692528ejc.183.2023.02.08.07.16.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Feb 2023 07:16:41 -0800 (PST) Content-Language: en-US In-Reply-To: <83k00snqhp.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255144 Archived-At: On 08/02/2023 17:09, Eli Zaretskii wrote: >> From: Xinyang Chen >> Date: Wed, 8 Feb 2023 09:25:07 -0500 >> >> I'm not seeing the point here though; what happens if you have a line with a single newline? What allows >> placing a cursor there in that case? > In that case, Emacs_knows_ that point is positioned at the newline, > so it does an extra-special trick of placing the cursor after the last > character of the line. > > But the 'cursor' property just supplies the index in the display > string where your Lisp program wants to place the cursor. Emacs > cannot place point inside a display string. So the display engine > needs to find where that index is on display. And it cannot find that > place because there's no glyph that corresponds to the newline. So, no chance of the display engine detecting that the same display string with the 'cursor' property has a newline at that position? That's unfortunate: that means we'll need to create some wonky workaround for displaying a completion preview (in Company) when a completion starts with a newline.