mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
vim-patch:9.0.0423: "for" and "while" not recognized after :vim9cmd and :legacy (#24825)
Problem: "for" and "while" not recognized after :vim9cmd and :legacy.
(Emanuele Torre)
Solution: Recognize all the command modifiers. (closes vim/vim#11087)
Add a test to check the list of modifiers.
9132426334
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -146,6 +146,15 @@ func Test_for_over_null_string()
|
||||
let &enc = save_enc
|
||||
endfunc
|
||||
|
||||
func Test_for_with_modifier()
|
||||
" this checks has_loop_cmd() works with a modifier
|
||||
let result = []
|
||||
horizontal for i in range(3)
|
||||
call extend(result, [i])
|
||||
endfor
|
||||
call assert_equal([0, 1, 2], result)
|
||||
endfunc
|
||||
|
||||
func Test_for_invalid_line_count()
|
||||
let lines =<< trim END
|
||||
111111111111111111111111 for line in ['one']
|
||||
|
Reference in New Issue
Block a user