From 7f7ad29671572c1b817e6318ca97b060a87b2742 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Thu, 26 Dec 2019 12:46:10 -0500 Subject: [PATCH] Improve lua interface for statusline --- internal/display/statusline.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/display/statusline.go b/internal/display/statusline.go index 172f850d..0f40355f 100644 --- a/internal/display/statusline.go +++ b/internal/display/statusline.go @@ -51,7 +51,7 @@ var statusInfo = map[string]func(*buffer.Buffer) string{ }, } -func SetStatusInfoFnLua(s string, fn string) { +func SetStatusInfoFnLua(fn string) { luaFn := strings.Split(fn, ".") if len(luaFn) <= 1 { return @@ -61,7 +61,7 @@ func SetStatusInfoFnLua(s string, fn string) { if pl == nil { return } - statusInfo[s] = func(b *buffer.Buffer) string { + statusInfo[fn] = func(b *buffer.Buffer) string { if pl == nil || !pl.IsEnabled() { return "" }