liquidz / vim-iced

Clojure Interactive Development Environment for Vim8/Neovim
https://liquidz.github.io/vim-iced/
MIT License
522 stars 35 forks source link

Error when clearing stdout buffer in neovim #351

Closed noahmoss closed 3 years ago

noahmoss commented 3 years ago

If I open the stdout buffer, print some data to it, and then press <leader>sl to clear the buffer, I see the following error.

Error detected while processing function iced#buffer#stdout#clear[1]..iced#buffer#clear[2]..iced#compat#deletebufline:
line   14:
E5555: API call: Vim:Error executing lua callback: [string "<VimL compiled string>"]:1: Vim(call):E16: Invalid range:  call s:RemoveRange(start, end) | endif

Pressing enter does clear the buffer, so it's not a huge deal, but a bit annoying that this pops up every time.

I'm on nvim 0.4.4

liquidz commented 3 years ago

@noahmoss Thanks for your reporting!

Hmm, I've never seen such error in my daily usages. With minimal configuration, I cannot reproduce the problem.

But I can confirm the problem with your dotfiles, so I'll try to examine it in detail.

noahmoss commented 3 years ago

@liquidz Thank you! If it's a problem with my dotfiles I'll try to dig into it myself later today. :)

liquidz commented 3 years ago

@noahmoss As far as I've tried, commenting out the following plugin will fix the problem. https://github.com/noahmoss/dotfiles/blob/8fb5fab3aa4c531571c9267a72642c952556a398/.vim/vimrc#L191

This plugin affects any buffers, so It may be a problem. https://github.com/axelf4/vim-strip-trailing-whitespace/blob/9a93dd653806ba3f886b2cf92111b663ce8d44bd/plugin/strip_trailing_whitespace.vim#L235-L239

noahmoss commented 3 years ago

Brilliant, looks like that plugin was the issue, thank you!