Skip to content

Commit 3f3f4b6

Browse files
committed
Create v0.2.1 release, fix viewport message wrap
1 parent 8e706c2 commit 3f3f4b6

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
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.1] - 2024-05-31
23+
24+
### Fixed
25+
26+
- Messages wrap properly with terminal viewport width
27+
2228
## [0.2.0] - 2024-05-31
2329

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

62-
[unreleased]: https://github.com/supleed2/go-chat/compare/v0.2.0...HEAD
68+
[unreleased]: https://github.com/supleed2/go-chat/compare/v0.2.1...HEAD
69+
[0.2.1]: https://github.com/supleed2/go-chat/releases/tag/v0.2.1
6370
[0.2.0]: https://github.com/supleed2/go-chat/releases/tag/v0.2.0
6471
[0.1.2]: https://github.com/supleed2/go-chat/releases/tag/v0.1.2
6572
[0.1.1]: https://github.com/supleed2/go-chat/releases/tag/v0.1.1

client/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type args struct {
7474
}
7575

7676
func (a *args) Version() string {
77-
return "v0.1.2"
77+
return "v0.2.1"
7878
}
7979
func (a *args) Description() string {
8080
return "Go, chat!\nA basic irc-style chat client, written in Go using bubbletea and websockets"
@@ -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().Width(30),
184+
idStyle: lipgloss.NewStyle(),
185185
pStyle: lipgloss.NewStyle().Bold(true),
186186
help: help.New(),
187187
recvCh: recvCh,
@@ -250,7 +250,6 @@ 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.idStyle.Width(msg.Width)
254253
m.help.Width = msg.Width - 1
255254
m.history.SetContent(m.viewMessages())
256255
}

server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const createRoomTable = "CREATE TABLE IF NOT EXISTS %s (tim DATETIME, id TEXT, m
6363
const insertRoomMsg = "INSERT INTO %v (tim, id, msg) VALUES (:tim, :id, :msg)"
6464

6565
func (a *args) Version() string {
66-
return "v0.1.2"
66+
return "v0.2.1"
6767
}
6868

6969
func (a *args) Description() string {

0 commit comments

Comments
 (0)