commit 2440d28
delthas
·
2026-03-11 12:32:46 +0000 UTC
parent 894b38b
Use casemapping for buffer comparison in highlight notification The $HERE variable in the on-highlight script was incorrect for query buffers when the buffer was created with different casing than the server uses (e.g. /msg NickName vs server sending from nickname). See: https://lists.sr.ht/~delthas/senpai-dev/patches/44105 Co-authored-by: ptrcnull <git@ptrcnull.me>
1 files changed,
+1,
-1
M
app.go
M
app.go
+1,
-1
1@@ -1737,7 +1737,7 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
2 app.win.AddLine(netID, buffer, line)
3 if line.Notify == ui.NotifyHighlight {
4 curNetID, curBuffer := app.win.CurrentBuffer()
5- current := app.win.Focused() && curNetID == netID && curBuffer == buffer
6+ current := app.win.Focused() && curNetID == netID && s.Casemap(curBuffer) == s.Casemap(buffer)
7 app.notifyHighlight(buffer, ev.User, line.Body.String(), current)
8 }
9 if !ev.TargetIsChannel && !s.IsMe(ev.User) {