Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch 9.0.0061: ml_get error with nested autocommand
Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
- Loading branch information
Showing
5 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2301,6 +2301,25 @@ func Test_autocmd_nested() | |
call assert_fails('au WinNew * nested nested echo bad', 'E983:') | ||
endfunc | ||
|
||
func Test_autocmd_nested_cursor_invalid() | ||
set laststatus=0 | ||
copen | ||
cclose | ||
call setline(1, ['foo', 'bar', 'baz']) | ||
3 | ||
augroup nested_inv | ||
autocmd User foo ++nested copen | ||
autocmd BufAdd * let &laststatus = 2 - &laststatus | ||
augroup END | ||
doautocmd User foo | ||
|
||
augroup nested_inv | ||
au! | ||
augroup END | ||
set laststatus& | ||
bwipe! | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
brammool
Author
Contributor
|
||
endfunc | ||
|
||
func Test_autocmd_once() | ||
" Without ++once WinNew triggers twice | ||
let g:did_split = 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This only wipes the quickfix buffer. I think
%bwipe!
is better here.