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#74854: [PATCH] Improve menu separator display on ttys slightly Date: Fri, 13 Dec 2024 18:16:51 +0200 Message-ID: <8634iry2vg.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32761"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74854@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 13 17:18:39 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 1tM8NC-0008OY-AE for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Dec 2024 17:18:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM8Mq-0000t5-Uv; Fri, 13 Dec 2024 11:18:16 -0500 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 1tM8Mf-0000WC-7w for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 11:18:09 -0500 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 1tM8Md-0008PM-HQ for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 11:18:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=ac0x5pPjDQcyPzwBjBaaz/eUcvyG3NLiuRWawGIdFak=; b=ER+gLNSk55qKMdsCT82J9yxjU3npPyFdQycC3MsRd5YxjsknOoYc+fyQjF3JjJHDN7Mm7NqeJ0+YlZF9pdjoP15+Ttv49LDVcj4u/h2fUyy+KvwVAZNr3KjdHVehu0YcfZ3880XF8SYu497IvMreh3bqIspfTk2v8JldnGDDgjfzCkSd2/XMk5z+qd73tT0UUaniUzoSmauSUmKl+dKd7vG+qyph2fbVOZ3ewTvJE0vUS47taj1wnCkDy7NwyPYWpyc1CN00L6lvixmX9UHXeU/ntLc1Y4/nrtNxtX4rROfRessEMcfb4SZwlQSUOa7TM/IglDktzfnLmRhDQS3dvw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tM8Mc-0006ll-Qh for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 11:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Dec 2024 16:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74854-submit@debbugs.gnu.org id=B74854.173410662725924 (code B ref 74854); Fri, 13 Dec 2024 16:18:02 +0000 Original-Received: (at 74854) by debbugs.gnu.org; 13 Dec 2024 16:17:07 +0000 Original-Received: from localhost ([127.0.0.1]:43862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM8Li-0006k1-Bf for submit@debbugs.gnu.org; Fri, 13 Dec 2024 11:17:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM8Lc-0006jB-5Q for 74854@debbugs.gnu.org; Fri, 13 Dec 2024 11:17:00 -0500 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 1tM8LW-00087p-S0; Fri, 13 Dec 2024 11:16:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ac0x5pPjDQcyPzwBjBaaz/eUcvyG3NLiuRWawGIdFak=; b=KvqKi12e3aQ+PS+EigDe EdC7pXzJtt2wPa9wJdiDDJDfIiNU9u9rGc3vtTvaZL21q5OHvGcaZuNStPlg2i7YOhGxIs2BkzlwF QCDbB6ULl2WgvX+dIJy6ObVEkmf5lDgKMR7IVjOjUZSJtQ90VQGHWEybLkuoG6HWDXhrM8mPQsmto PFi5SuCtxsrb+pJ1yxvV5Zj3H0O2PhnGekUBb7pLohKcbpajqz7yJVQw6NtSUGFG9kccoB6S+HzB+ uGxxsmyKE/9SDd2NHwOvHmSxKsr22IhCp27apVsM0L7lXVcW1TJQjHohVEqHeNtP8dzfYmGsR39h+ V48IMz8aDcBmcA==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 13 Dec 2024 16:09:30 +0100) 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:296979 Archived-At: > From: Gerd Möllmann > Date: Fri, 13 Dec 2024 16:09:30 +0100 > > Improvements: > > 1. Separators are displayed as lines over the whole menu, not > only as "--". > > 2. Support for 3 types of separators: --space -> line > of spaces, --double-line -> line of '=', others -> line of '-' Thanks. > +static void > +display_tty_menu_separator (struct it *it, const char *label, int width) > +{ > + static char sep[200]; Why 200? GNU Coding Standards frown on arbitrary limits. How about using alloca with 'width' as its argument?