Skip to content

Conversation

@adamlwgriffiths
Copy link
Contributor

This modifies TextInput to handle arbitrarily large inputs
that previously would overflow off the terminal and
become unreadable.
Add a _text_offset value which records the current
left index of the viewable space.
Change the key handling code to be more modular and
remove redundant code paths which end up with the
same result.
Add _text_offset updating in the key handling code.

There may be better ways of handling some of this, ie _visible_width.

Add a _text_offset value which records the current
left index of the viewable space.
Change the key handling code to be more modular and
remove redundant code paths which end up with the
same result.
Add _text_offset updating in the key handling code.
@sirfuzzalot sirfuzzalot added the enhancement New feature or request label Jun 11, 2022
@sirfuzzalot sirfuzzalot self-requested a review June 11, 2022 19:53
- update docstrings in new and existing TextInput methods
- add docstrings for attributes to support VSCode on-hover docstrings
- update readme with note about support for text overflow
Copy link
Owner

@sirfuzzalot sirfuzzalot left a comment

Choose a reason for hiding this comment

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

Thank you for putting in time to build out this feature. It really makes the component much more usable. 🙏

@sirfuzzalot sirfuzzalot merged commit 4818130 into sirfuzzalot:main Jun 11, 2022
@adamlwgriffiths adamlwgriffiths deleted the text_input_overflow branch June 12, 2022 00:58
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

Successfully merging this pull request may close these issues.

2 participants