From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Test to determine character left-overhangs a tab stretch. Date: Mon, 12 Nov 2018 18:13:29 +0200 Message-ID: <83y39y8eae.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542039152 14718 195.159.176.226 (12 Nov 2018 16:12:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2018 16:12:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Keith David Bershatsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 12 17:12:28 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gMEp9-0003jO-Vq for ged-emacs-devel@m.gmane.org; Mon, 12 Nov 2018 17:12:28 +0100 Original-Received: from localhost ([::1]:49411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMErG-0002ML-3o for ged-emacs-devel@m.gmane.org; Mon, 12 Nov 2018 11:14:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMEqV-0002LO-0j for emacs-devel@gnu.org; Mon, 12 Nov 2018 11:13:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMEqQ-00038X-7r for emacs-devel@gnu.org; Mon, 12 Nov 2018 11:13:50 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMEqG-00033e-Fh; Mon, 12 Nov 2018 11:13:40 -0500 Original-Received: from [176.228.60.248] (port=3918 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gMEqF-0006x3-Nk; Mon, 12 Nov 2018 11:13:36 -0500 In-reply-to: (message from Keith David Bershatsky on Sun, 11 Nov 2018 18:06:10 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231096 Archived-At: > Date: Sun, 11 Nov 2018 18:06:10 -0800 > From: Keith David Bershatsky > > I am working on feature requests #22873 (multiple fake cursors); and, #17684 (crosshairs). > > Fake cursors are placed on a line in the order of left to right. ns/x_draw_window_cursor calls draw_phys_cursor_glyph, which calls draw_glyphs. > > Certain wide characters to the immediate right of a tab stretch cause the tab stretch to be redrawn -- erasing the fake cursors that were previously placed along the tab stretch. Here is a screenshot depicting a tab stretch after the cursors have been erased from it -- the tab stretch had red hbar cursors before they were erased: > > https://www.lawlist.com/images/glyph_overhang_001.png > > How can programmatically test for this situation? Not sure what you are asking, but the logic for deciding when to redraw due to overhang is entirely inside draw_glyphs, so you could do the same as what it does.