[PATCH senpai] Fix default highlight command path not being used
Export this patch
---
This fixes the highlight command not being called if one is not
specified.
app.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app.go b/app.go
index 1144560..17d9e69 100644
--- a/app.go
+++ b/app.go
@@ -864,11 +864,11 @@ func (app *App) notifyHighlight(buffer, nick, content string) {
}
netID, curBuffer := app.win.CurrentBuffer()
- if _, err := os.Stat(app.cfg.OnHighlightPath); errors.Is(err, os.ErrNotExist) {
+ if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) {
// only error out if the user specified a highlight path
// if default path unreachable, simple bail
if app.cfg.OnHighlightPath != "" {
- body := fmt.Sprintf("Unable to find on-highlight command at path: %q", app.cfg.OnHighlightPath)
+ body := fmt.Sprintf("Unable to find on-highlight command at path: %q", path)
app.addStatusLine(netID, ui.Line{
At: time.Now(),
Head: "!!",
@@ -882,7 +882,7 @@ func (app *App) notifyHighlight(buffer, nick, content string) {
if buffer == curBuffer { // TODO also check netID
here = "1"
}
- cmd := exec.Command(app.cfg.OnHighlightPath)
+ cmd := exec.Command(path)
cmd.Env = append(os.Environ(),
fmt.Sprintf("BUFFER=%s", buffer),
fmt.Sprintf("HERE=%s", here),
--
2.34.1
Thanks!
To git.sr.ht:~taiite/senpai
80d5d8b..cd7f0af master -> master