Dominique Pellé wrote:
> > Christian Brabandt <[email protected]> wrote: > > > > > Bram, > > > while debugging the xdiff test, I stumbled about the error message > > > E685: Internal error: set_var() > > > > > > That was me, trying to clear v:errors, but unfortunately I thought > > > v:errors are of type string, while it is a list type. So the first time > > > :let v:errors='' > > > failed with the above error, while on the next try, it actually > > > succeeded. That is actually a bit confusing and just after hunting the > > > set_var() message, I actually found out what I did wrong :( > > > > > > So can we please make this something more obvious, e.g. like this: > > > > > > diff --git a/src/eval.c b/src/eval.c > > > index 7dfb98125..dd0164f04 100644 > > > --- a/src/eval.c > > > +++ b/src/eval.c > > > @@ -7568,7 +7568,10 @@ set_var( > > > return; > > > } > > > else if (v->di_tv.v_type != tv->v_type) > > > - internal_error("set_var()"); > > > + { > > > + internal_error("set_var(): wrong type!"); > > > + return; > > > + } > > > } > > > > > > clear_tv(&v->di_tv); > > > > Any internal error is a bug, so I don't think that let v:errors='' > > should give an internal error, it should give a regular error. > > For the record, this one also gives an internal error E685: > > $ vim --clean -c "let v:oldfiles=''" Now gives: E963: setting v:oldfiles to value with wrong type -- SOLDIER: What? A swallow carrying a coconut? ARTHUR: It could grip it by the husk ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
