@@ -526,7 +526,7 @@ func (b *Batch) Request(procedure string, result interface{}, args ...interface{
526526// result is the result of the function call.
527527func (v * Nvim ) Call (fname string , result interface {}, args ... interface {}) error {
528528 if args == nil {
529- args = [] interface {}{}
529+ args = emptyArgs
530530 }
531531 return v .call ("nvim_call_function" , result , fname , args )
532532}
@@ -542,7 +542,7 @@ func (v *Nvim) Call(fname string, result interface{}, args ...interface{}) error
542542// result is the result of the function call.
543543func (b * Batch ) Call (fname string , result interface {}, args ... interface {}) {
544544 if args == nil {
545- args = [] interface {}{}
545+ args = emptyArgs
546546 }
547547 b .call ("nvim_call_function" , result , fname , args )
548548}
@@ -560,7 +560,7 @@ func (b *Batch) Call(fname string, result interface{}, args ...interface{}) {
560560// result is the result of the function call.
561561func (v * Nvim ) CallDict (dict []interface {}, fname string , result interface {}, args ... interface {}) error {
562562 if args == nil {
563- args = [] interface {}{}
563+ args = emptyArgs
564564 }
565565 return v .call ("nvim_call_dict_function" , result , fname , dict , args )
566566}
@@ -578,7 +578,7 @@ func (v *Nvim) CallDict(dict []interface{}, fname string, result interface{}, ar
578578// result is the result of the function call.
579579func (b * Batch ) CallDict (dict []interface {}, fname string , result interface {}, args ... interface {}) {
580580 if args == nil {
581- args = [] interface {}{}
581+ args = emptyArgs
582582 }
583583 b .call ("nvim_call_dict_function" , result , fname , dict , args )
584584}
@@ -597,7 +597,7 @@ func (b *Batch) CallDict(dict []interface{}, fname string, result interface{}, a
597597// The returned result value of Lua code if present or nil.
598598func (v * Nvim ) ExecLua (code string , result interface {}, args ... interface {}) error {
599599 if args == nil {
600- args = [] interface {}{}
600+ args = emptyArgs
601601 }
602602 return v .call ("nvim_exec_lua" , result , code , args )
603603}
@@ -616,7 +616,7 @@ func (v *Nvim) ExecLua(code string, result interface{}, args ...interface{}) err
616616// The returned result value of Lua code if present or nil.
617617func (b * Batch ) ExecLua (code string , result interface {}, args ... interface {}) {
618618 if args == nil {
619- args = [] interface {}{}
619+ args = emptyArgs
620620 }
621621 b .call ("nvim_exec_lua" , result , code , args )
622622}
0 commit comments