From: Leon W. <moo...@us...> - 2004-12-04 08:34:55
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28809 Modified Files: AnyEditView.cpp Log Message: Fix: After the Block Comment failed, we can alway try to do a single line comment. Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** AnyEditView.cpp 3 Dec 2004 06:46:12 -0000 1.85 --- AnyEditView.cpp 4 Dec 2004 08:34:43 -0000 1.86 *************** *** 1276,1280 **** CSyntaxFile* pSyntaxFile = theApp.GetFileTypeManager()->GetSyntaxFile( GetDocument()->GetLanguageNr() ); if( NULL == pSyntaxFile ) return; ! m_Scintilla.CommentSelection( pSyntaxFile->GetDefaultBlockComment(), true ); } --- 1276,1284 ---- CSyntaxFile* pSyntaxFile = theApp.GetFileTypeManager()->GetSyntaxFile( GetDocument()->GetLanguageNr() ); if( NULL == pSyntaxFile ) return; ! if( !m_Scintilla.CommentSelection( pSyntaxFile->GetDefaultBlockComment(), true ) ) ! { ! // If we can't block comment the selection, we can try to single line comment it. ! m_Scintilla.CommentSelection( pSyntaxFile->GetDefaultSingleLineComment(), false ); ! } } |