aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/repl.cc
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-03-23 18:04:29 -0700
committerJade Lovelace <lix@jade.fyi>2024-03-23 18:04:29 -0700
commit946fc12e4e6d7e097c5b6ed4f6bc4d516b10b901 (patch)
treeb3de3d7b19bacbf3bea205538de0150afe0bcf0e /src/libcmd/repl.cc
parent652f52f071b127c0bd9f65c432131cf378ed221b (diff)
Revert "Merge pull request #9476 from alois31/restore-progress-bar"
Observed to regress nix repl attrset printing with narrow windows. This reverts commit a2d5e803cf16e048f30f0334114759f81f6c5d20. Fixes: https://git.lix.systems/lix-project/lix/issues/168 Change-Id: I8e0031475b4ec26d6a71014357d973578b70815c
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r--src/libcmd/repl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index b5a798911..ab7d7f18c 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -29,6 +29,7 @@
#include "local-fs-store.hh"
#include "signals.hh"
#include "print.hh"
+#include "progress-bar.hh"
#if HAVE_BOEHMGC
#define GC_INCLUDE_NEW
@@ -195,11 +196,13 @@ ReplExitStatus NixRepl::mainLoop()
auto _guard = interacter->init(static_cast<detail::ReplCompleterMixin *>(this));
+ /* Stop the progress bar because it interferes with the display of
+ the repl. */
+ stopProgressBar();
+
std::string input;
while (true) {
- // Hide the progress bar while waiting for user input, so that it won't interfere.
- logger->pause();
// When continuing input from previous lines, don't print a prompt, just align to the same
// number of chars as the prompt.
if (!interacter->getLine(input, input.empty() ? ReplPromptType::ReplPrompt : ReplPromptType::ContinuationPrompt)) {
@@ -210,7 +213,6 @@ ReplExitStatus NixRepl::mainLoop()
// the entire program?
return ReplExitStatus::QuitAll;
}
- logger->resume();
try {
switch (processLine(input)) {
case ProcessLineResult::Quit: