chrisbra / Recover.vim

A Plugin to show a diff, whenever recovering a buffer
http://www.vim.org/scripts/script.php?script_id=3068
248 stars 25 forks source link

[Bug] Unknown function: trim #70

Closed ZeyuSun closed 3 years ago

ZeyuSun commented 3 years ago

This modification from PR #69 gives me an error every time I open vim https://github.com/chrisbra/Recover.vim/blob/222c311cd9495ee2fce8945eb5b846832f14ccac/autoload/recover.vim#L21

Error detected while processing function recover#CheckSwapFileExists[4]..<SNR>87_Swapname:
line    4:
E117: Unknown function: trim
E15: Invalid expression: trim(execute('swapname'))
line    8:
E121: Undefined variable: a
E15: Invalid expression: a[1:] == 'No swap file'

Is this a vim version issue? I am using vim version 8.0.1453.

chrisbra commented 3 years ago

Ah, when I merged that, I wondered whether trim() is recent enough. Apparently not :(

Apparently this needs vim 8.0.1630