"Can only call this function in an unmodified buffer"
Closed this issue · 2 comments
daveyarwood commented
Since I updated neoterm today, I've started getting this error when I try to use it in a buffer with unsaved changes:
Error detected while processing function neoterm#open[5]..neoterm#new[15]..167:
line 4:
Can only call this function in an unmodified buffer
This happens when I use :Topen
or :T some-command
.
Is this intended behavior? I definitely find it useful to be able to run one-off commands regardless of the state of my buffer.
kassio commented
This behaviour changed a while ago. :T
and :Topen
will use the current buffer if you don't pass any vim-mods
, like :vert T
or :bel T
. To set a default mod set g:neoterm_default_mod
, like let g:neoterm_default_mod = 'botright'
.
daveyarwood commented
Makes sense to me. I have custom keybindings in my vimrc for :T
and :Topen
anyway, so I've adjusted them accordingly. Works like a charm. Thanks!