fix bug and add ClangClosePreviewDiagWindow cmd