From 9653858ce68a04e2c23dbf14e344d4dca4bf7e24 Mon Sep 17 00:00:00 2001 From: Alex Shabalin Date: Wed, 17 Nov 2021 16:38:03 +0100 Subject: [PATCH] Fix :e in repl Closes https://github.com/NixOS/nix/issues/5487 Co-authored-by: Alexander Bantyev balsoft@balsoft.ru --- src/nix/repl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 4f13ee05d..fd86174f2 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -471,7 +471,10 @@ bool NixRepl::processLine(string line) auto args = editorFor(pos); auto editor = args.front(); args.pop_front(); - runProgram(editor, true, args); + + // runProgram redirects stdout to a StringSink, + // using runProgram2 to allow editors to display their UI + runProgram2(RunOptions { .program = editor, .searchPath = true, .args = args }); // Reload right after exiting the editor state->resetFileCache();