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.bugs Subject: bug#71163: Cursor can disappear off the window if no-special-glyphs is enabled Date: Fri, 24 May 2024 10:20:19 +0300 Message-ID: <86v8333ccs.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34519"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71163@debbugs.gnu.org To: Emre Yolcu , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 24 09:21:10 2024 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 1sAPEj-0008nE-GJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 May 2024 09:21:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAPEZ-0000Bk-H4; Fri, 24 May 2024 03:20:59 -0400 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 1sAPEW-00008n-Q3 for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 03:20:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAPEW-0007CZ-IB for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 03:20:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAPEd-0004rH-9Y for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 03:21:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 May 2024 07:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71163 X-GNU-PR-Package: emacs Original-Received: via spool by 71163-submit@debbugs.gnu.org id=B71163.171653523618633 (code B ref 71163); Fri, 24 May 2024 07:21:03 +0000 Original-Received: (at 71163) by debbugs.gnu.org; 24 May 2024 07:20:36 +0000 Original-Received: from localhost ([127.0.0.1]:35454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAPEB-0004qT-R4 for submit@debbugs.gnu.org; Fri, 24 May 2024 03:20:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAPE9-0004qN-H6 for 71163@debbugs.gnu.org; Fri, 24 May 2024 03:20:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAPDx-0006xV-1Y; Fri, 24 May 2024 03:20:21 -0400 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=b7CMcSnDMHt4cLxasqeOeW1x10KLvO+yyXSmTkHWU2o=; b=bBhfh3bqqP4K J80dYWz6V/+2hOlXeLzNo+RUHKoZjyHAZSfQKtuc36buTGv1DW3CMapVfO5gbBIY2QbHmdc/JxylY /lZVORkMbOXafh9W7ka9bqEZfOJm3UnP0PbOVHBJXxjlCTSAqvTJjQjB5g+VoBYl2gUGiqJg/Bafm 0UQOxo+Hy3VdaW0j4lQbc/F0oDqL4m5nvcT2VCT9IMDj/nTMq7MBrzsaYi7H5tcZpXHMMhuxsChuo 4AY3WpHlBi2mimBhVlQGFEh5tyyRlvTllECPmXHTSJMBZsGsPyAXWldYnUdlUTWYPHtphTJuTcMfM LKZQhBidofLFZI9Ypfuq1Q==; In-Reply-To: (message from Emre Yolcu on Fri, 24 May 2024 00:42:29 -0400) 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:285747 Archived-At: > Date: Fri, 24 May 2024 00:42:29 -0400 > From: Emre Yolcu > > If the layout parameter no-special-glyphs is enabled and a line is > exactly as wide as a window, then the cursor placed at the end of the > line disappears off the window. Steps to confirm after "emacs -Q": > > 1. Evaluate the following: > > (set-frame-parameter nil 'no-special-glyphs nil) You must have meant (set-frame-parameter nil 'no-special-glyphs t) Because nil is the default value of this frame parameter. > (fringe-mode 0) > (scroll-bar-mode -1) The last part of disabling scroll-bars is not necessary, AFAICT. > 2. Insert some line that is exactly as wide as the window, leaving the > cursor at the end of the line. > > After those steps, the cursor is not visible. I'm not sure if this is > the intended behavior. I would expect the cursor to appear at the > beginning of the next screen line instead. If no-special-glyphs is not > enabled, then, as expected, the final character of the first screen line > is displayed as the continuation indicator "\", and the actual final > character of the line appears on the next screen line, with the cursor > after it. I don't really understand how this was intended to behave, so I added Martin who introduced this feature, in the hope that he could provide the explanation of the intent. This was added as part of support for child frames, so I presume it has something to do with child frames, but I don't really understand what exactly and why child frames would need that. AFAICT, this is currently broken in several ways: . it only has effect on GUI frames (basically, the code ignores this parameter on TTY frames), although the documentation doesn't say that, and I see no immediate reason why it wouldn't make sense on TTY frames; . it doesn't affect the display of fringe truncation and continuation bitmaps, although the documentation doesn't say that, either, and it is not clear to me that those bitmaps should be displayed in that case; . not only display of cursor in full-window lines is broken, but also the automatic horizontal scrolling (auto-hscroll-mode) in that case: the line is not hscrolled until you type one more character beyond those visible; . if you insert a TAB near the end of a screen line such that the next tab stop is on the next screen line, the TAB is shown with wrong number of columns, as if the next tab stop is at column zero of the next screen line. The last 2 points, and the report that started this bug discussion, are because the logic of line-continuation and truncation is basically broken in this case: the layout code thinks the continuation and truncation glyphs are inserted when needed, whereas they are not. That's because the layout code was not adapted to this frame parameter, only the geometry of the screen line was adjusted. Fixing this will take a while. But first we need to understand and agree on the scope of support for this frame parameter, and what Emacs should do in each supported case. Thanks.