Skip to content

Conversation

bestgopher
Copy link
Contributor

No description provided.

@djc
Copy link
Member

djc commented Feb 20, 2025

Thanks, this looks good. Can you add a test?

@bestgopher
Copy link
Contributor Author

Thanks, this looks good. Can you add a test?

Are there any examples for reference?

@djc
Copy link
Member

djc commented Feb 26, 2025

Thanks, this looks good. Can you add a test?

Are there any examples for reference?

Good question -- I guess we don't really do tests in this crate. Ignore my question!

src/utils.rs Outdated

#[cfg(feature = "ansi-parsing")]
fn char_width(c: char) -> usize {
pub fn char_width(c: char) -> usize {
Copy link
Member

Choose a reason for hiding this comment

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

If we're going to make this pub, please fold the not(feature = "ansi-parsing") variant into this function (which I think happens implicitly anyway?) and add a docstring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't consider it carefully. I have now made this function pub(crate).

Copy link
Member

Choose a reason for hiding this comment

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

So you don't need it in dialoguer anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you don't need it in dialoguer anymore?

I can add unicode_width crate in dialoguer.

@djc
Copy link
Member

djc commented Feb 26, 2025

(If you rebase on main, CI should pass.)

@djc djc merged commit d266d59 into console-rs:main Feb 26, 2025
15 checks passed
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request Mar 3, 2025
Bumps console from 0.15.10 to 0.15.11.

Release notes
Sourced from console's releases.

0.15.11
What's Changed

Don't eagerly close tty fd in read_secure by @​Noratrieb in console-rs/console#222
Make functions on Style const by @​tamird in console-rs/console#220
Fix some typos by @​waywardmonkeys in console-rs/console#213
Improve type safety, extract identical code by @​tamird in console-rs/console#223
Unix tweaks by @​djc in console-rs/console#230
Fix WASI target name by @​djc in console-rs/console#236
Simplify & update by @​djc in console-rs/console#237
fix: 🐛 remove double-width characters correctly by @​bestgopher in console-rs/console#234
Explicitly handle CtrlC on Windows by @​ericmarkmartin in console-rs/console#235
Windows mode tweaks by @​djc in console-rs/console#239




Commits

c7002e3 Refer to GitHub Releases
73033ec Bump version to 0.15.11
4fa21ad Simplify windows read_single_key()
456eb78 Remove unused cruft
8623cd6 Simplify ConsoleModeGuard::set()
ca2e0f8 Use match for creation of new console mode
2f7184f Add docstring for Windows set_console_mode()
3c7ba95 Explicitly handle CtrlC on Windows (#235)
de16ee6 Run clippy on all major platforms
cb6126e Extend application of clippy
Additional commits viewable in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.

2 participants