kassio / neoterm

Wrapper of some vim/neovim's :terminal functions.
Other
1.32k stars 117 forks source link

problem now with neoterm#close and neoterm#closeAll #201

Closed ysolis closed 6 years ago

ysolis commented 6 years ago

I am using neovim 0.2.2 (from Neovim PPA in Ubuntu 16.04)

This error appears just now, always before i began to edit any file:

Error detected while processing /home/yonsy/.local/share/nvim/plugged/neoterm/plugin/neoterm.vim:
line  113:
*g:neoterm_position* DEPRECATED! see :help g:neoterm_position
Press ENTER or type command to continue

:Tnew launch a new terminal but if i try to close the terminal (:call neoterm#close()), i get this error:

Error detected while processing function neoterm#close:                                                                                                                                                                           
line    1:
E121: Undefined variable: a:1
E116: Invalid arguments for function extend
E15: Invalid expression: extend(a:1, { 'target': 0, 'force': 0 }, 'keep')
line    2:
E121: Undefined variable: l:opts
E116: Invalid arguments for function s:target
E15: Invalid expression: s:target(l:opts)
line    4:
E121: Undefined variable: l:instance
E116: Invalid arguments for function empty
E15: Invalid expression: !empty(l:instance)
Press ENTER or type command to continue

and with :call neoterm#closeAll()

Error detected while processing function neoterm#closeAll:
line    2:
E121: Undefined variable: a:1
E116: Invalid arguments for function extend
E116: Invalid arguments for function neoterm#close
E121: Undefined variable: a:1
E116: Invalid arguments for function extend
E116: Invalid arguments for function neoterm#close

P.D. the problems remains with Neovim 0.2.3-dev from Neovim unstable PPA (Daily builds)

kassio commented 6 years ago

Hey ya! Thanks for reaching out!

Firstly, the g:neoterm_position is deprecated, please, check if you have it set on your vimrc/init.vim and replace it by g:neoterm_default_mod, to see possible values for this new variable check :help mods.

About the neoterm#close() and neoterm#closeAll() errors, these functions changed their arities. Actually, I'd suggest to use the commands instead :[N]Tclose and :[N]TcloseAll.

Please give it a try and let me know if it worked.

All the best!

ysolis commented 6 years ago

yes, changes done and my neovim is working good again ...thanks!