Browse Source

Revert "[display] kind of support --next for completion". See #8795

This reverts commit 82bd2c8afce872db026d5bb6fc19b1449ec24296.
Aleksandr Kuzmenko 6 years ago
parent
commit
463b108071
2 changed files with 5 additions and 8 deletions
  1. 4 6
      src/compiler/main.ml
  2. 1 2
      src/compiler/server.ml

+ 4 - 6
src/compiler/main.ml

@@ -667,13 +667,11 @@ let rec process_params create pl =
 				loop acc l
 				loop acc l
 			| _ -> loop (arg :: acc) l
 			| _ -> loop (arg :: acc) l
 	in
 	in
-	(* put --display in each_params if it was last parameter *)
-	let pl = match List.rev pl with
-		| file :: "--display" :: pl when file <> "memory" ->
-			each_params := "--display" :: file :: !each_params;
-			List.rev pl
+	(* put --display in front if it was last parameter *)
+	let pl = (match List.rev pl with
+		| file :: "--display" :: pl when file <> "memory" -> "--display" :: file :: List.rev pl
 		| _ -> pl
 		| _ -> pl
-	in
+	) in
 	loop [] pl
 	loop [] pl
 
 
 and init ctx =
 and init ctx =

+ 1 - 2
src/compiler/server.ml

@@ -52,8 +52,7 @@ let check_display_flush ctx f_otherwise = match ctx.com.json_out with
 			f_otherwise ()
 			f_otherwise ()
 		end
 		end
 	| Some api ->
 	| Some api ->
-		(* If there's a --next and we're in display mode, try that one. *)
-		if ctx.has_error && not (ctx.has_next && ctx.com.display.dms_display) then begin
+		if ctx.has_error then begin
 			let errors = List.map (fun msg ->
 			let errors = List.map (fun msg ->
 				let msg,p,i = match msg with
 				let msg,p,i = match msg with
 					| CMInfo(msg,p) -> msg,p,3
 					| CMInfo(msg,p) -> msg,p,3