Skip to content

fix: bounds-check start_line in Selection.extract()#6433

Closed
Jah-yee wants to merge 1 commit intoTextualize:mainfrom
Jah-yee:main
Closed

fix: bounds-check start_line in Selection.extract()#6433
Jah-yee wants to merge 1 commit intoTextualize:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 17, 2026

When Selection.extract() is called with coordinates that exceed the
text line count, it crashes with IndexError. This happens because
end_line is bounds-checked but start_line is not.

Fix: Add bounds check for start_line similar to end_line to prevent
IndexError when start_line exceeds the text line count.

Fixes #6428

When Selection.extract() is called with coordinates that exceed the
text line count, it crashes with IndexError. This happens because
end_line is bounds-checked but start_line is not.

Fix: Add bounds check for start_line similar to end_line to prevent
IndexError when start_line exceeds the text line count.

Fixes Textualize#6428
@TomJGooding
Copy link
Collaborator

More AI spam - see #6434 (comment)

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.

Selection.extract() crashes with IndexError

2 participants