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: Allowing point to be outside the window? Date: Sun, 05 Dec 2021 10:48:21 +0200 Message-ID: <83ilw34eui.fsf@gnu.org> References: <87ilwd7zaq.fsf.ref@yahoo.com> <87ilwd7zaq.fsf@yahoo.com> <83bl24yaed.fsf@gnu.org> <87sfvg7l51.fsf@yahoo.com> <83zgpowu23.fsf@gnu.org> <87zgpo5tws.fsf@yahoo.com> <83pmqkwi6r.fsf@gnu.org> <87v90c5su6.fsf@yahoo.com> <83o864wg2a.fsf@gnu.org> <87ilwb68ck.fsf@yahoo.com> <83zgpnunfo.fsf@gnu.org> <87fsrf3xmd.fsf@yahoo.com> <83y257ulfp.fsf@gnu.org> <8735ne4e0e.fsf@yahoo.com> <87czmcvcs1.fsf@yahoo.com> <87k0gkjzj3.fsf@dick> <87r1astsle.fsf@yahoo.com> <87ee6rubcz.fsf@yahoo.com> <83v9034j9z.fsf@gnu.org> <871r2rserm.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25301"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dick.r.chiang@gmail.com, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 05 09:49:19 2021 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 1mtnCv-0006Lz-9g for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 09:49:17 +0100 Original-Received: from localhost ([::1]:42700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtnCt-00025N-Sl for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 03:49:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnC6-0001PM-Fj for emacs-devel@gnu.org; Sun, 05 Dec 2021 03:48:26 -0500 Original-Received: from [2001:470:142:3::e] (port=33912 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnC6-0002ps-6k; Sun, 05 Dec 2021 03:48:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BxGVgBbSBAU4h+wXtHPoTxRqa/RtIMQjeUukNRVu+zA=; b=CnvwLt+gT8XS W1xB4GjQv9wqCUs97Y/NO/EVX2XaQEUJQqqKlrt4O06YImndFnxaKfhte87nWN9osqQVvLk8SpYCn l415t3ZyvEnoo0Yud4k6L43e44eroRu4TCzRwrTXgg7Aev7fQQA0fzVDV+hOV+ntaIGzIPAG6M8CR gXInB5kGMiAK/TbwPIiVjpP5cz4EFpiyGphaejOe5kyV3aUkBchdqUhOosIdUxx7OxGECDbzb9/L1 PKro9YtHnmN11AB/zL5mIDnw8kR5oJgv1sRyWn1qB47UpDk8hnPLGLp+B2kBnGwkRlRze963un3+t ggdxQMiWXKdXthTt14T8yQ==; Original-Received: from [87.69.77.57] (port=4751 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnC5-0006BX-Vi; Sun, 05 Dec 2021 03:48:26 -0500 In-Reply-To: <871r2rserm.fsf@yahoo.com> (message from Po Lu on Sun, 05 Dec 2021 15:16:13 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:280970 Archived-At: > From: Po Lu > Cc: dick.r.chiang@gmail.com, emacs-devel@gnu.org > Date: Sun, 05 Dec 2021 15:16:13 +0800 > > >> Can that value be relied on? > > > > Depends what for and how you want to rely on it. It basically says > > that the cursor position inside the window is unknown. The "normal" > > redisplay must always calculate some reasonable coordinates and put > > them there, otherwise the cursor will not be visible, which is a > > display bug. If that is enough for you, then yes, you can rely on it. > > I meant to ask whether or not I can forgo calculating whether point is > outside the window, and just test whether or not cursor.vpos is -1 to > determine if the cursor should be displayed, when point is allowed to be > outside the window. No. I think it should be the other way around: first see if point is outside of the window, then force cursor.vpos to be negative. That's because redisplay resets that value to -1 whenever it isn't sure the cursor will stay in its old position.