Skip to content

Conversation

@rmkaplan
Copy link
Contributor

For SEBINDS.TEDIT the initial suggested region should be wide enough for the longest line

@pamoroso
Copy link
Contributor

This PR does indeed improve TEdit's initial suggested region, here's the default for SEBINDS.TEDIT:

sebinds

@rmkaplan
Copy link
Contributor Author

A small further embellishment: when it looks for a region to recycle, it bounds the maximum and minimum sizes. So before, if it had looked at SEBINDS, then closed that window and applied Tedit to an ordinary documentation file, the region manager would have recycled the large SEBINDS region. With this commit it ignores that because it is more than 10% bigger than the heuristic suggestion

@pamoroso
Copy link
Contributor

I tested up to 8bce8f4 and the updated heuristics works well. But consider opening with TEdit the ASCII file PLAINTEXT.TEDIT that contains only:

Line 1
Line 2

Although the TEdit window correctly frames the content it looks cramped and adding more text requires resizing:

tedit-window

What about setting a wider minimum window size if the first few lines are shorter?

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Oct 24, 2025 via email

@pamoroso
Copy link
Contributor

That would be fine.

@pamoroso
Copy link
Contributor

I updated to commit 97e0147 and the new default for empty documents works well:

tedit-default-window

@pamoroso
Copy link
Contributor

The window size heuristics of commit 13e85e7 works as described.

@pamoroso
Copy link
Contributor

I updated to commit b2e8fa3 and I haven't noticed anything unusual.

Copy link
Contributor

@pamoroso pamoroso left a comment

Choose a reason for hiding this comment

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

It works well and as described in my tests.

@rmkaplan rmkaplan merged commit ac570f4 into master Oct 27, 2025
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.

3 participants