@@ -526,7 +526,7 @@ func (b *Batch) Request(procedure string, result interface{}, args ...interface{
526
526
// result is the result of the function call.
527
527
func (v * Nvim ) Call (fname string , result interface {}, args ... interface {}) error {
528
528
if args == nil {
529
- args = [] interface {}{}
529
+ args = emptyArgs
530
530
}
531
531
return v .call ("nvim_call_function" , result , fname , args )
532
532
}
@@ -542,7 +542,7 @@ func (v *Nvim) Call(fname string, result interface{}, args ...interface{}) error
542
542
// result is the result of the function call.
543
543
func (b * Batch ) Call (fname string , result interface {}, args ... interface {}) {
544
544
if args == nil {
545
- args = [] interface {}{}
545
+ args = emptyArgs
546
546
}
547
547
b .call ("nvim_call_function" , result , fname , args )
548
548
}
@@ -560,7 +560,7 @@ func (b *Batch) Call(fname string, result interface{}, args ...interface{}) {
560
560
// result is the result of the function call.
561
561
func (v * Nvim ) CallDict (dict []interface {}, fname string , result interface {}, args ... interface {}) error {
562
562
if args == nil {
563
- args = [] interface {}{}
563
+ args = emptyArgs
564
564
}
565
565
return v .call ("nvim_call_dict_function" , result , fname , dict , args )
566
566
}
@@ -578,7 +578,7 @@ func (v *Nvim) CallDict(dict []interface{}, fname string, result interface{}, ar
578
578
// result is the result of the function call.
579
579
func (b * Batch ) CallDict (dict []interface {}, fname string , result interface {}, args ... interface {}) {
580
580
if args == nil {
581
- args = [] interface {}{}
581
+ args = emptyArgs
582
582
}
583
583
b .call ("nvim_call_dict_function" , result , fname , dict , args )
584
584
}
@@ -597,7 +597,7 @@ func (b *Batch) CallDict(dict []interface{}, fname string, result interface{}, a
597
597
// The returned result value of Lua code if present or nil.
598
598
func (v * Nvim ) ExecLua (code string , result interface {}, args ... interface {}) error {
599
599
if args == nil {
600
- args = [] interface {}{}
600
+ args = emptyArgs
601
601
}
602
602
return v .call ("nvim_exec_lua" , result , code , args )
603
603
}
@@ -616,7 +616,7 @@ func (v *Nvim) ExecLua(code string, result interface{}, args ...interface{}) err
616
616
// The returned result value of Lua code if present or nil.
617
617
func (b * Batch ) ExecLua (code string , result interface {}, args ... interface {}) {
618
618
if args == nil {
619
- args = [] interface {}{}
619
+ args = emptyArgs
620
620
}
621
621
b .call ("nvim_exec_lua" , result , code , args )
622
622
}
0 commit comments