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
from

Conversation

Projects
None yet
4 participants
@Wilma456
Contributor

Wilma456 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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

lupus590 commented Dec 1, 2017

Max length as a settings option?

@Wilma456

This comment has been minimized.

Contributor

Wilma456 commented Dec 4, 2017

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

@lupus590

This comment has been minimized.

Contributor

lupus590 commented Dec 4, 2017

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

@thatcraniumguy

This comment has been minimized.

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