Commit f27716b
committed
fix: prevent status bar wrapping and add missing [q] Quit option
Fixed three issues in TUI status bar:
1. Duplicate '[q] Quit' on narrow terminals:
- Added .Width(m.width) constraint to statusBarStyle.Render() calls
- Prevents text wrapping when terminal width is constrained
- Status bar now truncates instead of wrapping to new line
2. Missing '[q] Quit' on wide terminals:
- Added '• [q] Quit' to wide terminal status messages
- Now consistently shows quit option across all terminal sizes
3. Width threshold adjustment:
- Adjusted isNarrow threshold from 100 to 108 columns
- Prevents wrapping when switching from compact to full-text mode
- Full menu text only appears when there's enough space to fit
Changes in renderStatusBar() function in pkg/listen/tui/view.go1 parent 81aec47 commit f27716b
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
| |||
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
216 | | - | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | | - | |
| 246 | + | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
249 | | - | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
0 commit comments