Skip to content

Conversation

@JDevlieghere
Copy link

No description provided.

Account for Unicode when computing the prompt column width. Previously,
the string length (i.e. number of bytes) rather than the width of the
Glyph was used to compute the cursor position. The result was that the
cursor would be offset to the right when using a prompt containing
Unicode.

(cherry picked from commit 850e90c)
Users often want to change the look of their prompt and currently the
only way to do that is by using ANSI escape codes in the prompt itself.
This is not only tedious, it also results in extra whitespace because
our Editline wrapper, when computing the cursor column, doesn't ignore
the invisible escape codes.

We already have various *-ansi-{prefix,suffix} settings that allow the
users to customize the color of auto-suggestions and progress events,
using mnemonics like ${ansi.fg.yellow}. This patch brings the same
mechanism to the prompt.

rdar://115390406
(cherry picked from commit 645a385)
llvm#66447)

Add a configuration entry for whether LLDB was configured with wide
character support in Editline and use it in a decorator to guard the
UTF-8 prompt test.

(cherry picked from commit 111bc6f)
@JDevlieghere
Copy link
Author

@swift-ci please test

@JDevlieghere JDevlieghere merged commit 28acbe5 into stable/20230725 Oct 17, 2023
@JDevlieghere JDevlieghere deleted the jdevlieghere/rdar/115390406 branch October 17, 2023 18:12
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