From e5f509ef0b5c364544c904faa0bfda57dba03611 Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Sun, 28 Apr 2024 16:32:58 +0200 Subject: [PATCH] nix repl: hide progress bar during :edit --- src/libcmd/repl.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index a045e83d2..bade1b538 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -506,6 +506,10 @@ ProcessLineResult NixRepl::processLine(std::string line) auto editor = args.front(); args.pop_front(); + // avoid garbling the editor with the progress bar + logger->pause(); + Finally resume([&]() { logger->resume(); }); + // runProgram redirects stdout to a StringSink, // using runProgram2 to allow editors to display their UI runProgram2(RunOptions { .program = editor, .lookupPath = true, .args = args });