Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable word-based line wrapping in text area #690

Open
dbohdan opened this issue Dec 18, 2024 · 0 comments
Open

Option to disable word-based line wrapping in text area #690

dbohdan opened this issue Dec 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dbohdan
Copy link

dbohdan commented Dec 18, 2024

Is your feature request related to a problem? Please describe.
I have started using the text area component in my new password manager, pago. The text area applies whole-word line wrapping. If one character of the word exceeds the line width, the word is wrapped to the next line. This is common and useful for writing prose but not normally used for text-based data. It means long cryptographic tokens like the keys in the following example aren't wrapped at all. I'll illustrate this with screenshots below.

# created: 2024-12-18T06:42:28+00:00
# public key: age1n207up3rglzp87mwgu03ne3m4uzdxasynrqpgxwcwa5tsfvlpf2qsrfhaj
AGE-SECRET-KEY-1Z9ZU8AHM3LW4PQG8FX03TWUHFAMQYUGU0ZTWMN2787CD29D0KV9SX4H6WH

Describe the solution you'd like
I would like a setting to switch from whole-word line wrapping to breaking the word on any character the way code editors do.

Describe alternatives you've considered
The alternatives are to leave things as they are (this isn't a deal-breaker), fork the text area component, or replace it.

Additional context
Here is how the wrapping mechanism normally works.
Screenshot with the unwrapped line.
The last word gets wrapped after you add one more space.
Screenshot with the same line wrapped.

Here is how it fails with a long age private key.
before-key-long
The user presses Space, and the whole token is shifted down one line.
after-key-long

@dbohdan dbohdan added the enhancement New feature or request label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant