Skip to content

Commit 0b896e1

Browse files
committed
Create v0.2.2 release, *actually* fix viewport wrap
1 parent 3f3f4b6 commit 0b896e1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

changelog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
### Security
2121

22+
## [0.2.2] - 2024-06-01
23+
24+
### Fixed
25+
26+
- Messages *actually* wrap properly with terminal viewport width this time
27+
2228
## [0.2.1] - 2024-05-31
2329

2430
### Fixed
@@ -65,7 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6571
- Go programs for [client](./tui/main.go) and [server](./server/main.go)
6672
- GitHub Actions release flow, including binaries
6773

68-
[unreleased]: https://github.com/supleed2/go-chat/compare/v0.2.1...HEAD
74+
[unreleased]: https://github.com/supleed2/go-chat/compare/v0.2.2...HEAD
75+
[0.2.2]: https://github.com/supleed2/go-chat/releases/tag/v0.2.2
6976
[0.2.1]: https://github.com/supleed2/go-chat/releases/tag/v0.2.1
7077
[0.2.0]: https://github.com/supleed2/go-chat/releases/tag/v0.2.0
7178
[0.1.2]: https://github.com/supleed2/go-chat/releases/tag/v0.1.2

client/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func initModel(ctx context.Context, conn *ws.Conn, a args, tz time.Location) mod
181181
showTim: a.Timestamps,
182182
tz: tz,
183183
history: vp,
184-
idStyle: lipgloss.NewStyle(),
184+
idStyle: lipgloss.NewStyle().Width(60),
185185
pStyle: lipgloss.NewStyle().Bold(true),
186186
help: help.New(),
187187
recvCh: recvCh,
@@ -250,7 +250,8 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
250250
m.history.Width = msg.Width
251251
m.history.GotoBottom()
252252
m.input.Width = msg.Width - 3
253-
m.help.Width = msg.Width - 1
253+
m.idStyle = m.idStyle.Width(msg.Width)
254+
m.help.Width = msg.Width
254255
m.history.SetContent(m.viewMessages())
255256
}
256257

0 commit comments

Comments
 (0)