Browse Source

[display] be even less retarded

Simon Krajewski 6 years ago
parent
commit
920d6a3eca
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/context/display/displayException.ml

+ 6 - 6
src/context/display/displayException.ml

@@ -58,15 +58,15 @@ let filter_somehow ctx items subject kind po =
 		| None -> ""
 		| None -> ""
 		| Some(subject,_) -> String.lowercase subject
 		| Some(subject,_) -> String.lowercase subject
 	in
 	in
-	let subject_matches subject s =
-		let rec loop i =
+	let subject_matches s =
+		let rec loop i o =
 			if i < String.length subject then begin
 			if i < String.length subject then begin
-				ignore(String.index_from s i subject.[i]);
-				loop (i + 1)
+				let o = String.index_from s o subject.[i] in
+				loop (i + 1) o
 			end
 			end
 		in
 		in
 		try
 		try
-			loop 0;
+			loop 0 0;
 			true
 			true
 		with Not_found ->
 		with Not_found ->
 			false
 			false
@@ -77,7 +77,7 @@ let filter_somehow ctx items subject kind po =
 			()
 			()
 		| item :: items ->
 		| item :: items ->
 			let name = String.lowercase (get_filter_name item) in
 			let name = String.lowercase (get_filter_name item) in
-			if subject_matches subject name then begin
+			if subject_matches name then begin
 				(* Treat types with lowest priority. The assumption is that they are the only kind
 				(* Treat types with lowest priority. The assumption is that they are the only kind
 				   which actually causes the limit to be hit, so we show everything else and then
 				   which actually causes the limit to be hit, so we show everything else and then
 				   fill in types. *)
 				   fill in types. *)