Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Simon Marchi <simark@simark.ca>
Cc: tromey@adacore.com, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 2/2] Allow check-mark to be changed for CLI
Date: Wed, 11 Jun 2025 18:40:03 +0300	[thread overview]
Message-ID: <86qzzqgucs.fsf@gnu.org> (raw)
In-Reply-To: <bef581f4-ee6a-4f7b-8d05-18373b9b3bc6@simark.ca> (message from Simon Marchi on Wed, 11 Jun 2025 11:18:39 -0400)

> X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,BAYES_00,
> 	DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=unavailable
> 	autolearn_force=no version=4.0.1
> Date: Wed, 11 Jun 2025 11:18:39 -0400
> Cc: tromey@adacore.com, gdb-patches@sourceware.org
> From: Simon Marchi <simark@simark.ca>
> 
> On 6/11/25 11:01 AM, Eli Zaretskii wrote:
> >> Date: Wed, 11 Jun 2025 10:33:56 -0400
> >> Cc: Eli Zaretskii <eliz@gnu.org>
> >> From: Simon Marchi <simark@simark.ca>
> >>
> >> I have not read all the discussions about the choice of the character,
> >> but I just wanted to report that out of the box, this doesn't look very
> >> good for me (the width of a checkmark isn't equal to the width of a
> >> character).  See attached `checkmark.png`.
> > 
> > That's because this emoji (as many others) is a wide character and
> > takes 2 columns on display, and GDB evidently doesn't take that into
> > account in this table-like display.
> 
> Yeah, even the non-emoji versions do take up 2 columns, I'm not sure why
> those don't result in the rest of the line being shifter.  I'm also
> surprised that others didn't see this...
> 
> GDB uses strlen here to compute the number of spaces to print, in order
> to align stuff correctly:
> 
> https://gitlab.com/gnutools/binutils-gdb/-/blob/master/gdb/cli-out.c#L147-168
> 
> So it necessarily won't play well with multi-byte characters.

We should use wcwidth, I think.

> >> Are we allowed to nitpick / bikeshed on the choice of character?  My
> >> preference would be for something a bit more subtle, like an arrow that
> >> points to the selected thing.  See `arrow.png`, which uses U+27A4.  I
> >> find it stylish, and at least on my setup, the width is correct.
> > 
> > An arrow is not a check-mark, though.
> 
> Why does it have to be a checkmark?

It doesn't have to be, but its name is check-mark.  We can change the
name, of course.

  reply	other threads:[~2025-06-11 15:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 13:58 [PATCH v2 0/2] Use check-mark for current row of CLI table Tom Tromey
2025-06-11 13:58 ` [PATCH v2 1/2] Introduce ui_out::field_check_mark Tom Tromey
2025-06-11 17:39   ` Kevin Buettner
2025-06-11 13:58 ` [PATCH v2 2/2] Allow check-mark to be changed for CLI Tom Tromey
2025-06-11 14:33   ` Simon Marchi
2025-06-11 14:57     ` Simon Marchi
2025-06-11 15:01     ` Eli Zaretskii
2025-06-11 15:18       ` Simon Marchi
2025-06-11 15:40         ` Eli Zaretskii [this message]
2025-06-11 17:37     ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86qzzqgucs.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=tromey@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox