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

Text area read only #4151

Merged
merged 19 commits into from
Feb 13, 2024
Merged

Text area read only #4151

merged 19 commits into from
Feb 13, 2024

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Feb 12, 2024

Adds a read_only attribute to TextArea.

When True, you cannot edit the content.

The bulk of the work here was more clearly defining the paths that edit operations take when they come in via the API vs via a users keyboard.

@darrenburns darrenburns marked this pull request as ready for review February 13, 2024 12:48
src/textual/widgets/_text_area.py Outdated Show resolved Hide resolved
src/textual/widgets/_text_area.py Outdated Show resolved Hide resolved
src/textual/widgets/_text_area.py Outdated Show resolved Hide resolved
tests/snapshot_tests/test_snapshots.py Show resolved Hide resolved
tests/text_area/test_edit_via_api.py Outdated Show resolved Hide resolved
tests/text_area/test_selection_bindings.py Outdated Show resolved Hide resolved
@darrenburns darrenburns merged commit e6ad1bd into main Feb 13, 2024
20 checks passed
@darrenburns darrenburns deleted the text-area-read-only branch February 13, 2024 15:16
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.

4 participants