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#64395: [PATCH] * src/xdisp.c (display_string): Don't truncate mode line in terminal Date: Sun, 02 Jul 2023 11:15:20 +0300 Message-ID: <83y1jyohk7.fsf@gnu.org> References: <20230701062756.78266-1-gongqijian@gmail.com> <83zg4gqdef.fsf@gnu.org> <834jmnrjzv.fsf@gnu.org> <831qhrrjlb.fsf@gnu.org> <83zg4fq48r.fsf@gnu.org> <83wmzjq1sf.fsf@gnu.org> <83ttunpzmc.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1370"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64395@debbugs.gnu.org To: gongqijian@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 02 10:15:22 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 1qFsEs-00009f-BQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jul 2023 10:15:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFsEa-00057j-A1; Sun, 02 Jul 2023 04:15:04 -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 1qFsEZ-00057R-7t for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 04:15:03 -0400 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 1qFsEY-0000BS-TS for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 04:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFsEY-0000tV-AQ for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 04:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2023 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64395 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64395-submit@debbugs.gnu.org id=B64395.16882856973411 (code B ref 64395); Sun, 02 Jul 2023 08:15:02 +0000 Original-Received: (at 64395) by debbugs.gnu.org; 2 Jul 2023 08:14:57 +0000 Original-Received: from localhost ([127.0.0.1]:59159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFsET-0000sx-HG for submit@debbugs.gnu.org; Sun, 02 Jul 2023 04:14:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFsEO-0000sg-FZ for 64395@debbugs.gnu.org; Sun, 02 Jul 2023 04:14:55 -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 1qFsEI-00009h-UT; Sun, 02 Jul 2023 04:14:46 -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=s21lZzyQIzXAZnU6eS9o6mZAXBz60LCIlopAzo9DjdA=; b=M6iy+K3ydz3H 6xGs3dIOsHgXkotAtrp8holY+u/KoQTTpedRU/0+xqxtivyNWbQhp+d5gXx2KTYgu0AR6ljmUg3qf ZproEDgk6m51aEOTT/po7KlqryefCSTy+QtD/+0qgV4SUlbMXUNmLWQPcgZ8k8QVaR7cGya8IoYPE QYvFguQoBeYGQwzU0QtdCMlubFsE8vq/H3jsUzAwVwRh9Q4HMTQp4aItrBxsoz7/t8LguwjszyXGo zpM8ZJ+R+03tpqZ5OneUCP9CB2cwFMIORtKB5lEWFBiSS2lzGBRla1v5ri0bb4QYwMXoj1z41kdfA IU8pn4l0tczR+udd/bE+ZQ==; Original-Received: from [87.69.77.57] (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 1qFsEI-0005QQ-EM; Sun, 02 Jul 2023 04:14:46 -0400 In-Reply-To: <83ttunpzmc.fsf@gnu.org> (message from Eli Zaretskii on Sat, 01 Jul 2023 15:47:39 +0300) 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:264458 Archived-At: > Cc: 64395@debbugs.gnu.org > Date: Sat, 01 Jul 2023 15:47:39 +0300 > From: Eli Zaretskii > > Your proposed change fixes the problem, but it fixes it incorrectly: > after applying the patch, I see a truncation glyph "$" at the end of > the mode line. This should never happen on the mode line: we don't > show truncation glyphs there. Compare the display after applying your > patch with the mode-line displayed after evaluating the below: > > (setq mode-line-format > (concat (format-mode-line > "- Ln %l, Col %c ") > (make-string 100 ?-))) > > As you see, the expected display of the mode line that is truncated is > simply not to see the truncated part, without any "$" truncation > glyph at the end of the mode line. > > So a slightly different change is needed to properly fix this case. > I'm working on such a proper fix. Should be fixed now on the master branch, please test.