This thread contains a patchset. You're looking at the original emails,
but you may wish to use the patch review UI.
Review patch
3
2
[PATCH 1/3] Drop unnecessary fmt.Sprintf
---
app.go | 2 + -
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app.go b/app.go
index 509a518..fde594e 100644
--- a/app.go
+++ b/app.go
@@ -262,7 +262,7 @@ func (app *App) eventLoop() {
if netID != "" && buffer != "" {
app.win.SetTitle(fmt.Sprintf("%s — senpai", buffer))
} else {
- app.win.SetTitle(fmt.Sprintf("senpai"))
+ app.win.SetTitle("senpai")
}
}
}
--
2.42.0
[PATCH 2/3] Remove unnecessary assignment to the blank identifier
---
completions.go | 2 + -
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/completions.go b/completions.go
index 4c8ff28..bac653d 100644
--- a/completions.go
+++ b/completions.go
@@ -113,7 +113,7 @@ func (app *App) completionsCommands(cs []ui.Completion, cursorIdx int, text []ru
}
uText := strings.ToUpper(string(text[1:cursorIdx]))
- for name, _ := range commands {
+ for name := range commands {
if strings.HasPrefix(name, uText) {
c := make([]rune, len(text)+len(name)-len(uText))
copy(c[:1], []rune("/"))
--
2.42.0
[PATCH 3/3] ui.Beep: don't swallow return value
---
ui/ui.go | 4 ++ --
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/ui.go b/ui/ui.go
index b463089..e4c1b68 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -458,8 +458,8 @@ func (ui *UI) Size() (int, int) {
return ui.screen.Size()
}
- func (ui *UI) Beep() {
- ui.screen.Beep()
+ func (ui *UI) Beep() error {
+ return ui.screen.Beep()
}
func (ui *UI) Notify(title string, body string) {
--
2.42.0
Re: [PATCH 3/3] ui.Beep: don't swallow return value
Hi,
Thanks for your patch.
- Drop unnecessary fmt.Sprintf: applied
- Remove unnecessary assignment to the blank identifier: outdated
- ui.Beep: don't swallow return value: not applied: I'd like to keep the
semantics of the Beep function at the UI level to be "try to beep,
best-effort"
Amended and pushed :-)
To git.sr.ht:~taiite/senpai
0604b0a..94a8582 master -> master