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, 28 Nov 2021 14:58:20 +0200 Message-ID: <83pmqkwi6r.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 28 13:58:51 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 1mrJlb-000ALW-CN for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 13:58:51 +0100 Original-Received: from localhost ([::1]:40652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrJlZ-00037O-Fn for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 07:58:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrJkx-0002RQ-CV for emacs-devel@gnu.org; Sun, 28 Nov 2021 07:58:11 -0500 Original-Received: from [2001:470:142:3::e] (port=60528 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 1mrJkw-00044f-S4; Sun, 28 Nov 2021 07:58:10 -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=9IwFcPDZYBDfH1JcLaT7liFKtySXPnz0wZfe/mHnO+U=; b=LY9kei4aajea klQQYkcWNOSpAm7XqvTH3unPfTD/uijHThiq0fqyWX0KTiYgZk8Cg7eA7idbreMtJIiFsNUmz+zxg gbtbBTRjoDMqQpHgS25bIPm4Y+HXHkphRavRWsCMdS9QpCUIC1oykJKH2fTNx30BDdk25XZhsooNZ 1t8GumqiNQ82QMxwei7DdpyKAuPa8BAVI1oWXRN4h7PQIH6Jj+QypdMaBrZDr0eiffTTsig45Z5r5 UGkO/2KgLfnkEYmLEbzT117Gpt+PM3smzXXC54M4j5PXNt4JHXmhtdwS2ZkZewHmj1k3gVf2xCML4 IqtCJEN/7AaMD0ecX+FnqQ==; Original-Received: from [87.69.77.57] (port=1158 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 1mrJkw-0004Dx-FC; Sun, 28 Nov 2021 07:58:10 -0500 In-Reply-To: <87zgpo5tws.fsf@yahoo.com> (message from Po Lu on Sun, 28 Nov 2021 20:47:15 +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:280403 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sun, 28 Nov 2021 20:47:15 +0800 > > Hmm, thanks. One small question though: what should I do in order to > make a window's cursor invisible? Prevent display_and_set_cursor from being called, I presume? There's also set_cursor_from_row, which calculates where to display the cursor, and something should be done about that to indicate that the cursor is not shown at all. > I want to detect if PT is before window start, and in that case refrain > from displaying the phys cursor. Right now, I test for that condition > in redisplay_window, and the test seems to work display_and_set_cursor is also called from dispnew.c, so I'm not sure redisplay_window alone will be enough. And why only "before window start"? what about beyond window's end? > but I have no idea how to mark the window's cursor as invisible, so > to speak. I think you need to add something to the struct window's 'cursor' and 'phys_cursor' members. > Or perhaps this is an X/Y question, but I'm not sure. You cannot express coordinates outside of the window as X/Y.