Added tab closing

I added the closing of tabs and changed the indentation from spaces to
tabs. It seems that the text editor is still active (just not visible) after the tab is closed because the buttons (undo, redo, zoom, etc.) remain enabled.