Long filenames destroy the titlebar layout
See original GitHub issueDescription
If you open a file with a long filename the titlebar use more than a single line.
Steps to reproduce
- Open a file with a long filename
Expected behavior: [What you expected to happen]
Filename is shortened to meet into a single line.
E.g: aaaaa...dddd.md or just aaaaaaaaa...
Actual behavior: [What actually happened]

Versions
- Mark Text: all versions
IssueHunt Summary
fxha has been rewarded.
Backers (Total: $20.00)
issuehunt ($20.00)
Submitted pull Requests
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
Long filenames destroy the titlebar layout #339 - Issuehunt
Open a file with a long filename. Expected behavior: [What you expected to happen]. Filename is shortened to meet into a single line....
Read more >File name in title bar truncated - Glyphs Forum
Sometimes the file name in the title bar is truncated even though there seems to be enough space available. I understand that the...
Read more >[Bug] "use_custom_titlebar=True" blocks "resizable=True" #5252
Here's one way to write the Titlebar you're after with the "#373737" background color. You can also specify it when creating the Window...
Read more >Truncating long filenames - Best Practices?
I need to truncate a long filename with consideration to the file's extensions (png, gif, pdf, etc...) and am wondering what the best ......
Read more >Long filename - Wikipedia
255-character mixed-case long filename is possible only for files, or folders with no sub-folders, at the root folder of any drive.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mklpiening At present, it seems that any solution that can solve multi-line display problems is a good solution. I also agree with your plan, but we need to determine whether the path to the file is so long that one line cannot be completely displayed and it is determined that it cannot be displayed. After that, just follow your plan.
If you can submit a PR is better, any problems in the implementation can be discussed with us.
Long paths are also a problem.
I would suggest setting a size for the minimal shown filename and cutting the front and end of the title.
Lets say we have a minimal filename size of 16 and the titlebar can hold up to 48 symbols: change
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > cc > dddddddddddddddddddddddd.mdto...bbbbbbbbbbbbbbbbbb > cc > dddddddddddddddd...I prefer cutting the filename at the end because most of the time the first part of the filename holds the information about what file you are editing.