tenseleyflow/fackr / 9905b80

Browse files

fix: prevent terminal bleed-through in fuss mode status bar

Fill the status bar row in fuss mode column with background color
to prevent terminal content from showing through.
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
9905b80d04714dcfd1f93ba338e6312ff4916120
Parents
6f0f03c
Tree
c80c46a

1 changed file

StatusFile+-
M src/render/screen.rs 12 4
src/render/screen.rsmodified
@@ -893,12 +893,9 @@ impl Screen {
893
         repo_name: &str,
893
         repo_name: &str,
894
         branch: Option<&str>,
894
         branch: Option<&str>,
895
         git_mode: bool,
895
         git_mode: bool,
896
-        max_rows: Option<u16>,
897
     ) -> Result<()> {
896
     ) -> Result<()> {
898
         let width = width as usize;
897
         let width = width as usize;
899
-        // Use max_rows if provided (e.g., when terminal is visible), otherwise use full height
898
+        let text_rows = self.rows.saturating_sub(1) as usize;
900
-        let available_rows = max_rows.unwrap_or(self.rows);
901
-        let text_rows = available_rows.saturating_sub(1) as usize;
902
         let hint_rows = if hints_expanded { 4 } else { 1 };
899
         let hint_rows = if hints_expanded { 4 } else { 1 };
903
         // Header line + separator + optional git mode line
900
         // Header line + separator + optional git mode line
904
         let header_rows = if git_mode { 3 } else { 2 };
901
         let header_rows = if git_mode { 3 } else { 2 };
@@ -1119,6 +1116,17 @@ impl Screen {
1119
             }
1116
             }
1120
         }
1117
         }
1121
 
1118
 
1119
+        // Fill the status bar row for fuss mode column (prevents terminal bleed-through)
1120
+        let status_row = self.rows.saturating_sub(1);
1121
+        execute!(self.stdout, MoveTo(0, status_row))?;
1122
+        let status_fill = " ".repeat(width);
1123
+        execute!(
1124
+            self.stdout,
1125
+            SetBackgroundColor(BG_COLOR),
1126
+            Print(&status_fill),
1127
+            ResetColor
1128
+        )?;
1129
+
1122
         Ok(())
1130
         Ok(())
1123
     }
1131
     }
1124
 
1132