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

fix: make Document.end zero-indexed #4427

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

tconbeer
Copy link
Contributor

@tconbeer tconbeer commented Apr 18, 2024

Fixes #4426

This changes Document.end to return a zero-indexed Location.

The only downstream dependency of this property in the Textual codebase is TextArea.clear, which is not impacted by this change (as tested in tests/text_area/test_edit_via_api.py::test_clear).

In the Changelog, I've marked this as a fix, although it's possible it's a breaking change for some app developers.

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation (this behavior is not documented directly, so no changes were made)
  • Updated CHANGELOG.md (where appropriate)

@tconbeer tconbeer marked this pull request as ready for review April 18, 2024 18:28
Copy link
Member

@darrenburns darrenburns left a comment

Choose a reason for hiding this comment

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

Thanks Ted!

@darrenburns darrenburns merged commit 76c0992 into Textualize:main Apr 19, 2024
20 checks passed
@TomJGooding
Copy link
Contributor

🤦 Sorry my bad!

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.

Document.end line number is off by one (1-indexed)
3 participants