Closed bootleq closed 3 years ago
@bootleq Thanks for your reporting!
Maybe just remove the throw code? I have done a local try and seems it works fine.
We are using the throw
code in IcedDocumentPopupOpen
and IcedSourcePopupShow
as follows.
https://github.com/liquidz/vim-iced/blob/0116d293f607883c83ed7a53d0dbccf77ab287c7/autoload/iced/nrepl/document.vim#L141-L157
In this case, virtual text component which uses popup component is the problem. And virtual text should be able to show texts of any length for Vim/Nvim, so I fixed to trim texts in virtual text component.
I just cut v3.5.5 #354 Could you try the latest version?
Thank you very much!
I didn't notice the catch in those Popup functions, just tried the new version and confirmed fixed.
Currently the
iced#nrepl#eval#code
can break during its default callbackiced#nrepl#eval#out
throwing'vim-iced: too long texts to show in popup'
. Seems we have no handling for this error and lead the workflow to be halted, hooks likeevaluated
won't trigger, though the eval is in fact successful.Steps to reproduce:
(Vim 8.2.3174, vim-iced 3.5.4) Execute
:IcedEval (apply str (repeat (* 54 200) "x"))
(Please change54
200
to large enough values, to vim's&lines
and&columns
)Expected result: after evaluated, small popup appear and display the result,
evaluated
hook (if any) can be triggered. Actual result: no popup, noevaluated
triggered (but the result doesecho
in vim)Possible solution
Maybe just remove the
throw
code? I have done a local try and seems it works fine.