]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0768: legacy/vim9cmd modifiers are not exclusive v9.2.0768
authorIllia Bobyr <illia.bobyr@gmail.com>
Thu, 2 Jul 2026 18:51:04 +0000 (18:51 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 2 Jul 2026 18:51:04 +0000 (18:51 +0000)
commita9b46d323b16673d6b26360ef7907afb1b19cd0f
tree404a522f929e770e29ac5a6914263dbda708854b
parent02f2745e2757f8353e2e76db130682ed966f5544
patch 9.2.0768: legacy/vim9cmd modifiers are not exclusive

Problem:  legacy/vim9cmd modifiers are not exclusive
Solution: when parsing command modifiers clear the other flag
          (Illia Bobyr)

When one of the ":legacy" or ":vim9cmd" prefixes is used, it sets a
flag.  As the rest of the code might check either of the flags, setting
both could produce confusing results.  It does not make a lot of sense
to use both prefixes in the same command.  But just in case it is used,
selecting the last prefix seems reasonable.

closes: #20682

Signed-off-by: Illia Bobyr <illia.bobyr@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/ex_docmd.c
src/testdir/test_vim9_cmd.vim
src/version.c