question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Long filenames destroy the titlebar layout

See original GitHub issue

Issuehunt badges

Description

If you open a file with a long filename the titlebar use more than a single line.

Steps to reproduce

  1. 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]

mt_titlebar_bug

Versions

  • Mark Text: all versions

IssueHunt Summary

fxha fxha has been rewarded.

Backers (Total: $20.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Jocscommented, Jun 16, 2018

@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.

1reaction
mklpieningcommented, Jun 15, 2018

Long paths are also a problem. screenshot 2018-06-15 at 17 35 18 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.md to ...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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found