diff src/vim9execute.c @ 22302:36e8e046c335 v8.2.1700

patch 8.2.1700: Vim9: try/catch causes wrong value to be returned Commit: https://github.com/vim/vim/commit/9939f57b7f1c17a0142ebfe4f9e0b634158593e1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 16 22:29:52 2020 +0200 patch 8.2.1700: Vim9: try/catch causes wrong value to be returned Problem: Vim9: try/catch causes wrong value to be returned. Solution: Reset tcd_return. (closes https://github.com/vim/vim/issues/6964)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Sep 2020 22:30:03 +0200
parents 3515f341e8ac
children 74d0a7a30583
line wrap: on
line diff
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1922,6 +1922,7 @@ call_def_function(
 		    trycmd->tcd_catch_idx = iptr->isn_arg.try.try_catch;
 		    trycmd->tcd_finally_idx = iptr->isn_arg.try.try_finally;
 		    trycmd->tcd_caught = FALSE;
+		    trycmd->tcd_return = FALSE;
 		}
 		break;