Skip to content

Use fixed-width ASCII checkbox markers - #939

Open
kisaraki wants to merge 1 commit into
microsoft:mainfrom
kisaraki:codex/ascii-checkbox-markers
Open

Use fixed-width ASCII checkbox markers#939
kisaraki wants to merge 1 commit into
microsoft:mainfrom
kisaraki:codex/ascii-checkbox-markers

Conversation

@kisaraki

Copy link
Copy Markdown
Contributor

Summary

  • replace terminal-dependent checkbox glyphs with fixed-width [ ] and [x] markers
  • avoid box-border displacement caused by ambiguous glyph widths in some terminals
  • keep the change limited to the generic checkbox renderer

Validation

  • cargo test --all-features --all-targets on Windows and WSL/Ubuntu
  • cargo clippy --workspace --all-features --all-targets -- --no-deps --deny warnings on Windows and WSL/Ubuntu

Contribution ownership

This contribution is entirely my own work. It is not created on behalf of, or connected with, any organization or company. I agree to contribute it under the repository's MIT License and to the repository's applicable contribution terms.

@stdmnpkg stdmnpkg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also improve usability on terminal with only ASCII font

following picture is current situation, "match case" and "use regex" is unchecked, "whole word" is checked

Image

Comment thread crates/edit/src/tui.rs
self.attr_reverse();
}
self.styled_label_add_text(if *checked { "[ " } else { "[ " });
self.styled_label_add_text(if *checked { "[x] " } else { "[ ] " });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe [X] ?

Image

@lhecker

Copy link
Copy Markdown
Member

This contribution is entirely my own work.

I mean we both know an LLM created this. And in most parts of the world, LLM output is not copyrightable, but public domain. You cannot claim it as "your work" because legally speaking, a "work" is generally understood as something that is copyrightable. So, your series of PRs do not constitute a "work".

@lhecker Leonard Hecker (lhecker) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please name terminals where the current use of glyphs is an issue?

After all, this application also uses "…" in menu items, which is also ambiguous width.

@stdmnpkg

Copy link
Copy Markdown
Contributor

Can you please name terminals where the current use of glyphs is an issue?

图片

QmlTermWidget based terminal had issue align box border due to use of
xTerm and Linux console (the non graphic console, showed above) can not distinguish between two different state of checkbox.

I'd suggest accept this, at least for usability on ASCII only environment.

@lhecker

Leonard Hecker (lhecker) commented Aug 26, 2026

Copy link
Copy Markdown
Member

While I'm open to improving support for important terminals, such as the Linux Console, I'm not eager to improve support for rare terminals such as QmlTermWidget.

This is because broad support for old or primitive terminals requires complexity in the TUI design that I'd like to avoid. The Linux Console is a good example for that since almost anything more complex than a modal editor like vim fails to work. How would we design msedit to reliably work there? I don't know...

It is similar when it comes to using non-ASCII glyphs. Should we support systems that do not support Unicode glyphs? Maybe we shouldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants