Added a quick toggle to auto close preview window

This is useful in python mode, where the preview window opens on
completion.