-
-
Notifications
You must be signed in to change notification settings - Fork 27
TEDIT: Better heuristic estimate of initial region, better management of margin bar #2326
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
TEDIT: Better heuristic estimate of initial region, better management of margin bar #2326
Conversation
|
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 |
|
I tested up to 8bce8f4 and the updated heuristics works well. But consider opening with TEdit the ASCII file PLAINTEXT.TEDIT that contains only: Although the TEdit window correctly frames the content it looks cramped and adding more text requires resizing:
What about setting a wider minimum window size if the first few lines are shorter? |
|
Should it just always provide as a minimum, plain or formatted, what it defaults to for an empty document? 200 x 100 ?
… On Oct 24, 2025, at 3:53 AM, Paolo Amoroso ***@***.***> wrote:
pamoroso
left a comment
(Interlisp/medley#2326)
<#2326 (comment)>
I tested up to 8bce8f4 <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.png (view on web) <https://github.com/user-attachments/assets/b20a827a-303c-4474-8df3-1b0d9fbdfb5a>
What about setting a wider minimum window size if the first few lines are shorter?
—
Reply to this email directly, view it on GitHub <#2326 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQSTUJOH33SY7JW7NQBUVAD3ZIAMPAVCNFSM6AAAAACJ6FI3ESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTINBSGQ4TGNZVHA>.
You are receiving this because you authored the thread.
|
|
That would be fine. |
|
I updated to commit 97e0147 and the new default for empty documents works well:
|
|
The window size heuristics of commit 13e85e7 works as described. |
|
I updated to commit b2e8fa3 and I haven't noticed anything unusual. |
pamoroso
left a comment
There was a problem hiding this 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.



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