[mono/monodevelop] [2 commits] f6912214: Fixed 'Bug 15303 - Redundant cast false positive'.

Mike Krüger ([email protected]) <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141b7fbe5ae-cd03355e-db3d-450a-b150-43ae39b9aa67-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/compare/77610dd52753...a28e82d46f02

   Commit: f6912214881e503a7b817a50376500024587408a
   Author: Mike Krüger <[email protected]> (mkrueger)
     Date: 2013-10-14 08:26:46 GMT
      URL: https://github.com/mono/monodevelop/commit/f6912214881e503a7b817a50376500024587408a

Fixed 'Bug 15303 - Redundant cast false positive'.

Changed paths:
  M main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs

Modified: main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs
===================================================================
@@ -57,7 +57,7 @@ static IEnumerable<BaseCodeIssueProvider> EnumerateProvider (CodeIssueProvider p
 
 		public static IEnumerable<Result> Check (Document input, CancellationToken cancellationToken)
 		{
-			if (!QuickTaskStrip.EnableFancyFeatures)
+			if (!QuickTaskStrip.EnableFancyFeatures || input.Project == null)
 				return Enumerable.Empty<Result> ();
 
 			#if PROFILE

   Commit: a28e82d46f0277074f4d8b85de43beb8f57ff8a4
   Author: Mike Krüger <[email protected]> (mkrueger)
     Date: 2013-10-14 08:26:46 GMT
      URL: https://github.com/mono/monodevelop/commit/a28e82d46f0277074f4d8b85de43beb8f57ff8a4

Fixed mixed line ending detection.

Changed paths:
  M main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
===================================================================
@@ -154,8 +154,11 @@ public void Initalize (string text)
 				int delimiterEndOffset = delimiter.Offset + delimiter.Length;
 				var newLine = new TreeNode (delimiterEndOffset - offset, delimiter.Length);
 				nodes.Add (newLine);
-				if (offset > 0 && delimiterType != delimiter.UnicodeNewline)
-					LineEndingMismatch = true;
+				if (offset > 0) {
+					LineEndingMismatch |= delimiterType != delimiter.UnicodeNewline;
+				} else {
+					delimiterType = delimiter.UnicodeNewline;
+				}
 				offset = delimiterEndOffset;
 			}
 			var lastLine = new TreeNode (text.Length - offset, 0);
_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.