-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BUG] spinning forever in _split_cells with negative cut #3532
Comments
That may make the error go away, but it is unlikely to be the fix.
|
So it gets passed down from here: https://github.com/Textualize/textual/blob/6f5eb419a6dd48aa1727677360f67ad405c0bd51/src/textual/widgets/_text_area.py#L1218 Where scroll_x is 0, virtual_width is 0, and gutter_width is 3. I suppose another place to enforce this could be in the crop function: Where the start is clamped to zero, but the end isn't clamped to the start? start = max(0, start)
+ end = max(start, end)
end = self.cell_length if end is None else min(self.cell_length, end) |
The issue was fixed in Textual. Thanks for the report. |
I hope we solved your problem. If you like using Rich, you might also enjoy Textual |
Thanks, @willmcgugan ! |
See tconbeer/harlequin#659
Started as of: #3521 in 13.9.2
Somehow, the
_split_cells
function is passed a negative value for cut and it sits in an infinite loop.I don't really understand what this function is doing, but this patch worked well for me!
The text was updated successfully, but these errors were encountered: