I modified the Kate tab bar plugin to add the possibility to close a document by a mouse middle
click on the tab button. The feature can be enabled/disabled by a checkbox in the plugin config
page and it's off by default to preserve the original behavior.
If enabled, a middle click on a tab button *without* any key modifier pressed will close the
corresponding document, unless it's the last one (because in this case a new empty document
would be automatically opened again).
Attached proposed patch.
I also moved most of the single line function definition from the .cpp to the .h inside the class
declaration. This is just a matter of personal choice. If you don't like that or it's against some sort
of convention, just ignore that part of the patch.
The patch also removes to "unused variable" warning messages.