Show Filenames in Multishell Title
With this PR, you can directly see, which File is opened is which tab, if you have multiple files open.
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.
Max length as a settings option?
@lupus590 Whiyh is a good name for this settings? Maybe multishell.max_filename? What do you think?
I would suggest multishell.tabTitleMaxLength (or is underscore the established convention?)
Can one of the admins verify this patch?