mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Merge pull request #5586 from tweag/fix-stdout-for-editors-in-repl
Fix :e in repl
This commit is contained in:
commit
205655e98b
1 changed files with 4 additions and 1 deletions
|
@ -471,7 +471,10 @@ bool NixRepl::processLine(string line)
|
||||||
auto args = editorFor(pos);
|
auto args = editorFor(pos);
|
||||||
auto editor = args.front();
|
auto editor = args.front();
|
||||||
args.pop_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
|
// Reload right after exiting the editor
|
||||||
state->resetFileCache();
|
state->resetFileCache();
|
||||||
|
|
Loading…
Reference in a new issue