mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3324: Vim9: Cannot use :silent with :endwhile
Problem: Vim9: Cannot use :silent with :endwhile. Solution: Allow for using the :silent modifier. (closes #8737)
This commit is contained in:
@@ -3061,9 +3061,11 @@ parse_command_modifiers(
|
||||
* Return TRUE if "cmod" has anything set.
|
||||
*/
|
||||
int
|
||||
has_cmdmod(cmdmod_T *cmod)
|
||||
has_cmdmod(cmdmod_T *cmod, int ignore_silent)
|
||||
{
|
||||
return cmod->cmod_flags != 0
|
||||
return (cmod->cmod_flags != 0 && (!ignore_silent
|
||||
|| (cmod->cmod_flags
|
||||
& ~(CMOD_SILENT | CMOD_ERRSILENT | CMOD_UNSILENT)) != 0))
|
||||
|| cmod->cmod_split != 0
|
||||
|| cmod->cmod_verbose != 0
|
||||
|| cmod->cmod_tab != 0
|
||||
@@ -3074,9 +3076,9 @@ has_cmdmod(cmdmod_T *cmod)
|
||||
* If Vim9 script and "cmdmod" has anything set give an error and return TRUE.
|
||||
*/
|
||||
int
|
||||
cmdmod_error(void)
|
||||
cmdmod_error(int ignore_silent)
|
||||
{
|
||||
if (in_vim9script() && has_cmdmod(&cmdmod))
|
||||
if (in_vim9script() && has_cmdmod(&cmdmod, ignore_silent))
|
||||
{
|
||||
emsg(_(e_misplaced_command_modifier));
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user