Describe the bug
Since bb1b5e2 (8.2.1365) autocommands are not always parsed correctly anymore.
To Reproduce
- Run
vim --clean test.vim -S test.vim with
augroup test
autocmd!
autocmd BufReadPost *
\ if !exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif |
\ endif
augroup END
- Run
:edit foo | buffer #. Alternatively put the cursor on a keyword and press K.
- Result:
Error detected while processing BufRead Autocommands for "*":
E121: Undefined variable: line
Expected behavior
No errors.
Environment
Vim version 8.2.1377
Describe the bug
Since bb1b5e2 (8.2.1365) autocommands are not always parsed correctly anymore.
To Reproduce
vim --clean test.vim -S test.vimwith:edit foo | buffer #. Alternatively put the cursor on a keyword and pressK.Expected behavior
No errors.
Environment
Vim version
8.2.1377