Enable preview mode and fix markdown mode when multiple windows are open