diff options
author | James McCoy <jamessan@jamessan.com> | 2016-11-14 16:16:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 16:16:18 -0500 |
commit | 0c799a8f10b345236efca08f51ffece0e1d1e85d (patch) | |
tree | 4556d12ec412b0ff6a24aca20171581bea8e92aa /src | |
parent | 4539d867d491c9ca748f3d2de505092c4769824d (diff) | |
parent | 0b686e9b61c92e13c32f1bbc126586437be8aade (diff) | |
download | rneovim-0c799a8f10b345236efca08f51ffece0e1d1e85d.tar.gz rneovim-0c799a8f10b345236efca08f51ffece0e1d1e85d.tar.bz2 rneovim-0c799a8f10b345236efca08f51ffece0e1d1e85d.zip |
Merge pull request #5606 from jamessan/vim-7.4.1658
vim-patch:7.4.1658
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 1 | ||||
-rw-r--r-- | src/nvim/eval.h | 1 | ||||
-rw-r--r-- | src/nvim/main.c | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 8 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
6 files changed, 14 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 5d4241c8af..b8173c7570 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -384,6 +384,7 @@ static struct vimvar { VV(VV_NULL, "null", VAR_SPECIAL, VV_RO), VV(VV__NULL_LIST, "_null_list", VAR_LIST, VV_RO), VV(VV__NULL_DICT, "_null_dict", VAR_DICT, VV_RO), + VV(VV_VIM_DID_ENTER, "vim_did_enter", VAR_NUMBER, VV_RO), }; #undef VV diff --git a/src/nvim/eval.h b/src/nvim/eval.h index d6800afd52..1ab908deb5 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -124,6 +124,7 @@ typedef enum { VV_NULL, VV__NULL_LIST, // List with NULL value. For test purposes only. VV__NULL_DICT, // Dictionary with NULL value. For test purposes only. + VV_VIM_DID_ENTER, } VimVarIndex; /// All recognized msgpack types diff --git a/src/nvim/main.c b/src/nvim/main.c index ffd9353252..1bd622bdba 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -511,7 +511,8 @@ int main(int argc, char **argv) if (p_im) need_start_insertmode = TRUE; - apply_autocmds(EVENT_VIMENTER, NULL, NULL, FALSE, curbuf); + set_vim_var_nr(VV_VIM_DID_ENTER, 1L); + apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf); TIME_MSG("VimEnter autocommands"); /* When a startup script or session file setup for diff'ing and diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 87c1cd2c58..60f264fb3f 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -2,6 +2,7 @@ " This makes testing go faster, since Vim doesn't need to restart. source test_assign.vim +source test_autocmd.vim source test_cursor_func.vim source test_ex_undo.vim source test_expr.vim diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim new file mode 100644 index 0000000000..12c984888e --- /dev/null +++ b/src/nvim/testdir/test_autocmd.vim @@ -0,0 +1,8 @@ +" Tests for autocommands + +func Test_vim_did_enter() + call assert_false(v:vim_did_enter) + + " This script will never reach the main loop, can't check if v:vim_did_enter + " becomes one. +endfunc diff --git a/src/nvim/version.c b/src/nvim/version.c index a51c2b6ea9..c1459466a2 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -786,7 +786,7 @@ static int included_patches[] = { // 1661 NA // 1660, // 1659 NA - // 1658, + 1658, // 1657 NA // 1656, // 1655 NA |