From 900bdfea5835a67ad3465ec644b72984a9a2ea59 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Thu, 8 Jun 2017 15:02:00 -0700 Subject: [PATCH] Reset `running = true` in `Cursive::run` This allows to start another loop after quitting the first time. --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8d14cec..dcf5b78 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -582,9 +582,13 @@ impl Cursive { /// /// Calls [`step(&mut self)`] until [`quit(&mut self)`] is called. /// + /// After this function returns, you can call + /// it again and it will start a new loop. + /// /// [`step(&mut self)`]: #method.step /// [`quit(&mut self)`]: #method.quit pub fn run(&mut self) { + self.running = true; // And the big event loop begins! while self.running {