mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0731: Vim9: parsing declarations continues after :finish
Problem: Vim9: parsing declarations continues after :finish. Solution: Bail out when encountering :finish.
This commit is contained in:
@@ -130,6 +130,12 @@ ex_vim9script(exarg_T *eap)
|
||||
vim_free(((char_u **)(gap->ga_data))[--gap->ga_len]);
|
||||
((char_u **)(gap->ga_data))[gap->ga_len++] = NULL;
|
||||
}
|
||||
else if (checkforcmd(&p, "finish", 4))
|
||||
{
|
||||
// TODO: this should not happen below "if false".
|
||||
// Use "if cond | finish | endif as a workaround.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Compile the :def functions.
|
||||
|
Reference in New Issue
Block a user