summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Abell <galen@galenabell.com>2022-02-28 14:23:32 +0100
committerdelthas <delthas@dille.cc>2022-04-20 18:21:23 +0200
commitcd7f0af5d06d94b9169f1c5f7721b45ec5ca70d2 (patch)
treecbf26e24abbe2540afc31b0e1e0616cfc4bbc4bb
parentAdd a config option for unread buffer text color (diff)
Fix default highlight command path not being used
-rw-r--r--app.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/app.go b/app.go
index 9c85db3..1bea770 100644
--- a/app.go
+++ b/app.go
@@ -970,11 +970,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: "!!",
@@ -988,7 +988,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),