mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
Improve lua interface for statusline
This commit is contained in:
@@ -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, ".")
|
luaFn := strings.Split(fn, ".")
|
||||||
if len(luaFn) <= 1 {
|
if len(luaFn) <= 1 {
|
||||||
return
|
return
|
||||||
@@ -61,7 +61,7 @@ func SetStatusInfoFnLua(s string, fn string) {
|
|||||||
if pl == nil {
|
if pl == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
statusInfo[s] = func(b *buffer.Buffer) string {
|
statusInfo[fn] = func(b *buffer.Buffer) string {
|
||||||
if pl == nil || !pl.IsEnabled() {
|
if pl == nil || !pl.IsEnabled() {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user