Repository: Canop/bacon (language: rust)

Issue:
Not displaying correctly on Windows Terminal, offset by one line
When running Bacon from Windows Terminal, the display is vertically offset by a single line such that the top bar is not visible while the shortcut legend at the bottom occupies two lines.

Top bar will appear for a split second when scrolling, but will then disappear again. Display will adjust to window resizing as normal but will retain the vertical offset.

![image](https://github.com/Canop/bacon/assets/29840600/b15399a6-41a7-46cc-8902-f49a510d9291)


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc8a2c2..5390833 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
 ### next
 - insert features related arguments before the -- when there's some - Fix #171
+- fix offset in Windows terminal - Fix #175
 
 <a name="v2.14.2"></a>
 ### v2.14.2 - 2024/02/10
diff --git a/bacon.toml b/bacon.toml
index e19714a..abffac1 100644
--- a/bacon.toml
+++ b/bacon.toml
@@ -18,6 +18,14 @@ command = [
 need_stdout = false
 watch = ["benches"]
 
+
+[jobs.win]
+command = [
+	"cross", "build",
+	"--target", "x86_64-pc-windows-gnu",
+]
+
+
 [jobs.test]
 command = [
     "cargo", "test", "--color", "always",
diff --git a/src/app.rs b/src/app.rs
index 114b2f9..c2f8ab6 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -74,13 +74,6 @@ pub fn run(
             recv(user_events) -> user_event => {
                 match user_event?.event {
                     Event::Resize(mut width, mut height) => {
-                        // I don't know why but Crossterm seems to always report an
-                        // understimated size on Windows
-                        #[cfg(windows)]
-                        {
-                            width += 1;
-                            height += 1;
-                        }
                         state.resize(width, height);
                     }
                     Event::Key(key_event) => {


Test patch: