| 
     
      
      
      From: Leon W. <moo...@us...> - 2004-12-04 08:31:34
      
     
   | 
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28219 Modified Files: ScintillaEx.cpp Log Message: Bugfix: CommentSelection can't do a single line comment if block comment fails, we don't now the default index for single line comment. Added extra check for an index of -1. Index: ScintillaEx.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ScintillaEx.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ScintillaEx.cpp 25 Nov 2004 13:04:24 -0000 1.20 --- ScintillaEx.cpp 4 Dec 2004 08:31:21 -0000 1.21 *************** *** 1208,1211 **** --- 1208,1214 ---- long lSelEnd = GetSelectionEnd(); + // If we don't have an index we can't comment the selection. + if( -1 == iComment ) return false; + if( bBlockComment ) { *************** *** 1213,1218 **** CString szBlockEnd = GetBlockCommentEnd( iComment ); ! // If we don't have block comment tags, do single line comment ! if( szBlockStart.IsEmpty() || szBlockEnd.IsEmpty() ) return CommentSelection( iComment ); // We must be able to undo this. --- 1216,1221 ---- CString szBlockEnd = GetBlockCommentEnd( iComment ); ! // If we don't have block comment tags we can't continue; ! if( szBlockStart.IsEmpty() || szBlockEnd.IsEmpty() ) return false; // We must be able to undo this.  |