From 62579b0fc2b1bd4bc7e5b65ff102fcd7bcb1bd88 Mon Sep 17 00:00:00 2001 From: Daan Sieben <3742687+Daanoz@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:27:04 +0200 Subject: [PATCH] Fix missing feature and scenario headers in interactive terminal mode (#300, #299) --- CHANGELOG.md | 3 +++ src/writer/basic.rs | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54d0496f..25732391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,11 @@ All user visible changes to `cucumber` crate will be documented in this file. Th ### Fixed - Incorrect terminal width detection when its height is low. ([#298]) +- Incorrect terminal lines clearing in interactive mode. ([#300], [#299]) [#298]: /../../pull/298 +[#299]: /../../issues/299 +[#300]: /../../pull/300 diff --git a/src/writer/basic.rs b/src/writer/basic.rs index 3369a5ce..570fee97 100644 --- a/src/writer/basic.rs +++ b/src/writer/basic.rs @@ -281,7 +281,6 @@ impl Basic { feature: &gherkin::Feature, ) -> io::Result<()> { let out = format!("{}: {}", feature.keyword, feature.name); - self.lines_to_clear += self.styles.lines_count(&out); self.output.write_line(&self.styles.ok(out)) } @@ -327,7 +326,6 @@ impl Basic { rule.name, indent = " ".repeat(self.indent) ); - self.lines_to_clear += self.styles.lines_count(&out); self.indent += 2; self.output.write_line(&self.styles.ok(out)) } @@ -455,7 +453,6 @@ impl Basic { retries.current, retries.left + retries.current, ); - self.lines_to_clear += self.styles.lines_count(&out); self.output.write_line(&self.styles.retry(out)) } else { let out = format!( @@ -464,7 +461,6 @@ impl Basic { scenario.keyword, scenario.name, ); - self.lines_to_clear += self.styles.lines_count(&out); self.output.write_line(&self.styles.ok(out)) } }