Error when loading the plugin in Neovim
Onturenio opened this issue · comments
I'm trying to use the script in Neovim v0.4.3, but when doing so I get this error (sorry, in Spanish):
Se ha detectado un error al procesar /home/user/.vim/bundle/vim-slime-cells/autoload/slime_cells.vim:
línea 13
E475: El argumento no es válido: include_header=0) abort
línea 16
E133: ":return" no está dentro de una función
línea 39
E193: ¡":endfunction" no está dentro de una función!
The problem seems to be in the following function:
function! slime_cells#select_current_cell(include_header=0) abort
let cell_delimiter = slime_cells#get_delimiter()
if cell_delimiter == ""
return
endif
let [line_ini, col_ini] = searchpos(cell_delimiter, 'bcnW')
let line_end = search(cell_delimiter, 'nW')
if !line_ini
let line_ini = 1
elseif !a:include_header
let line_ini = line_ini + 1
let col_ini = 1
end
" line before delimiter or bottom of file
let line_end = line_end ? line_end - 1 : line("$")
let col_end = strlen(getline(line_end))
call setpos("'<", [0, line_ini, col_ini, 0])
call setpos("'>", [0, line_end, col_end, 0])
normal! gv
let current_mode = mode()
if current_mode != "V"
normal! V
endif
endfunction```
This error does not happen in Vim 8.1 with the same .vim files.
Hi! thanks for reporting the issue, I'll see what I can do this weekend.
Thanks for the fast reply. Please note that after posting this I kept trying several things. Eventually, I updated Neovim to a newer version (I was using v0.4.3, now v0.8.2) and it works now without issues.