Try and fix weird preview selection related issues
Expose close_type on close menu command
Merge branch 'master' into ST3