Rename konsole tabs in vim with globs makes things wrong
===

I have the following configuration in my `vimrc` to have the title of `kde Konsole` tabs automatically changed accordingly to the title of the current file edited in `vim.


    " rename konsole terminal tab with the current filename
    " http://vim.wikia.com/wiki/KDE_Konsole_renameSession_to_edited_file_name
    " http://cathay4t.blogspot.fr/2011/08/auto-login-via-ssh-and-change-konsole.html
    autocmd BufReadPost * :silent !qdbus org.kde.konsole $KONSOLE_DBUS_SESSION org.kde.konsole.Session.setTitle 1 % &
    autocmd VimLeavePre * :silent !qdbus org.kde.konsole $KONSOLE_DBUS_SESSION org.kde.konsole.Session.setTabTitleFormat 0 $'%d : %n\n' &

My problem is that when I open a bunch of files with a `glob` like
    
    vim *.pl

the `Konsole` becomes buggy : characters are mixed randomly in the screen. No problem with only one file, the `Konsole tab` is settled as it should.
 
Any hint to kill this bug ? I thought of counting the number of files opened in vim,  