-
-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Closed
Copy link
Description
The following code creates 2 TextAreas pre-populated with 20 Tab characters.
from textual.app import App, ComposeResult
from textual.widgets import TextArea
class MyApp(App):
def compose(self) -> ComposeResult:
yield TextArea(
id='textarea1',
soft_wrap=False,
text="\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
)
yield TextArea(
id='textarea2',
soft_wrap=True,
text="\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
)
if __name__ == "__main__":
MyApp().run()The first TextArea has soft_wrap disabled, while the second one does not.
By using a mouse to select the Tab characters, the selection in the first TextArea incorrectly jumps forward 1 tab character per space. The selection in the second TextArea follows the expected behavior.
Textual Diagnostics
Versions
| Name | Value |
|---|---|
| Textual | 0.85.2 |
| Rich | 13.9.4 |
Python
| Name | Value |
|---|---|
| Version | 3.12.0 |
| Implementation | CPython |
| Compiler | MSC v.1935 64 bit (AMD64) |
| Executable | C:\Program Files\Python312\python3.exe |
Operating System
| Name | Value |
|---|---|
| System | Windows |
| Release | 10 |
| Version | 10.0.19045 |
Terminal
| Name | Value |
|---|---|
| Terminal Application | Windows Terminal |
| TERM | Not set |
| COLORTERM | Not set |
| FORCE_COLOR | Not set |
| NO_COLOR | Not set |
Rich Console options
| Name | Value |
|---|---|
| size | width=188, height=52 |
| legacy_windows | False |
| min_width | 1 |
| max_width | 188 |
| is_terminal | True |
| encoding | utf-8 |
| max_height | 52 |
| justify | None |
| overflow | None |
| no_wrap | False |
| highlight | None |
| markup | None |
| height | None |
Metadata
Metadata
Assignees
Labels
No labels