comparison src/ex_docmd.c @ 29010:36ef8d453ade v8.2.5027

patch 8.2.5027: error for missing :endif when an exception was thrown Commit: https://github.com/vim/vim/commit/bf79a4e48d09a5ae08645592885d54230fed30b8 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 27 13:52:08 2022 +0100 patch 8.2.5027: error for missing :endif when an exception was thrown Problem: Error for missing :endif when an exception was thrown. (Dani Dickstein) Solution: Do not give an error when aborting. (closes #10490)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 May 2022 15:00:04 +0200
parents 49d8b54802f3
children f79cff615e69
comparison
equal deleted inserted replaced
29009:04e5f52e0f72 29010:36ef8d453ade
1202 * If a sourced file or executed function ran to its end, report the 1202 * If a sourced file or executed function ran to its end, report the
1203 * unclosed conditional. 1203 * unclosed conditional.
1204 * In Vim9 script do not give a second error, executing aborts after 1204 * In Vim9 script do not give a second error, executing aborts after
1205 * the first one. 1205 * the first one.
1206 */ 1206 */
1207 if (!got_int && !did_throw && !(did_emsg && in_vim9script()) 1207 if (!got_int && !did_throw && !aborting()
1208 && !(did_emsg && in_vim9script())
1208 && ((getline_equal(fgetline, cookie, getsourceline) 1209 && ((getline_equal(fgetline, cookie, getsourceline)
1209 && !source_finished(fgetline, cookie)) 1210 && !source_finished(fgetline, cookie))
1210 || (getline_equal(fgetline, cookie, get_func_line) 1211 || (getline_equal(fgetline, cookie, get_func_line)
1211 && !func_has_ended(real_cookie)))) 1212 && !func_has_ended(real_cookie))))
1212 { 1213 {