diff src/evalfunc.c @ 22039:f040df1bd219 v8.2.1569

patch 8.2.1569: Vim9: fixes not tested; failure in getchangelist() Commit: https://github.com/vim/vim/commit/a5d3841177e0b3545381c875d0b4b442f38784bd Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 2 21:02:35 2020 +0200 patch 8.2.1569: Vim9: fixes not tested; failure in getchangelist() Problem: Vim9: fixes for functions not tested; failure in getchangelist(). Solution: Add tests. (closes https://github.com/vim/vim/issues/6813, closes https://github.com/vim/vim/issues/6815, closes https://github.com/vim/vim/issues/6817)
author Bram Moolenaar <Bram@vim.org>
date Wed, 02 Sep 2020 21:15:03 +0200
parents 52e970719f4b
children 47ff9e5be532
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3081,12 +3081,7 @@ f_getchangelist(typval_T *argvars, typva
     if (argvars[0].v_type == VAR_UNKNOWN)
 	buf = curbuf;
     else
-    {
-	(void)tv_get_number(&argvars[0]);    // issue errmsg if type error
-	++emsg_off;
-	buf = tv_get_buf(&argvars[0], FALSE);
-	--emsg_off;
-    }
+	buf = tv_get_buf_from_arg(&argvars[0]);
     if (buf == NULL)
 	return;