Closed shanesmith closed 3 years ago
The output of execute('swapname') includes a leading newline character which makes the swapinfo() call later on fail. Fixed by trimming the output.
execute('swapname')
swapinfo()
:echo execute('swapname') /path/to/afile.swp
:echo swapinfo(execute('swapname')) {'error': 'Cannot open file'}
:echo swapinfo(trim(execute('swapname'))) {'pid': 1234, [...]}
thanks!
The output of
execute('swapname')
includes a leading newline character which makes theswapinfo()
call later on fail. Fixed by trimming the output.