Skip to content
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

Show Filenames in Multishell Title #495

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

@JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Nov 22, 2017

With this PR, you can directly see, which File is opened is which tab, if you have multiple files open.

@@ -21,6 +21,10 @@ if not fs.exists( sPath ) and not string.find( sPath, "%." ) then
end
end

if multishell and settings.get( "edit.multishell_title" ) == true then

This comment has been minimized.

@SquidDev

SquidDev Nov 22, 2017
Contributor

There isn't any need for == true. I know you prefer it, but let's keep it consistent with the rest of the code :).

@SquidDev
Copy link
Contributor

@SquidDev SquidDev commented Dec 1, 2017

I wonder if it'd be worth limiting file names to 20 characters or something? Maybe something like:

local name = fs.getName( path )
if #name > 20 then name = name:sub(1, 17) .. "..." end
if multishell and settings.get( "paint.multishell_title" ) == true then
  multishell.setTitle( multishell.getCurrent(), "paint (" .. name .. ")" )
end

This way really long file names won't fill the tab bar, but most file names will still display fine.

@Lupus590
Copy link
Contributor

@Lupus590 Lupus590 commented Dec 1, 2017

Max length as a settings option?

@JakobDev
Copy link
Contributor Author

@JakobDev JakobDev commented Dec 4, 2017

@Lupus590 Whiyh is a good name for this settings? Maybe multishell.max_filename? What do you think?

@Lupus590
Copy link
Contributor

@Lupus590 Lupus590 commented Dec 4, 2017

I would suggest multishell.tabTitleMaxLength (or is underscore the established convention?)

@thatcraniumguy
Copy link

@thatcraniumguy thatcraniumguy commented May 23, 2018

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants