diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2020-05-29 18:45:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 09:45:32 -0700 |
commit | 977c0f292fe155dbf1748d6a0ff020f89cf7a894 (patch) | |
tree | 4056f285caeb42d8932cf5034fc1397d68d21754 /test/functional/api/vim_spec.lua | |
parent | 5a9226c800d3075821203952da7c38626180680d (diff) | |
download | rneovim-977c0f292fe155dbf1748d6a0ff020f89cf7a894.tar.gz rneovim-977c0f292fe155dbf1748d6a0ff020f89cf7a894.tar.bz2 rneovim-977c0f292fe155dbf1748d6a0ff020f89cf7a894.zip |
API: nvim_create_buf: unset 'modeline' in scratch-buffer #12379
Although 'nomodeline' is not strictly part of the definition of
a "scratch-buffer" it is obviously the right default.
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 2e9d0f57ac..debdfb9e9a 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -1808,7 +1808,7 @@ describe('API', function() eq({id=1}, meths.get_current_buf()) end) - it("doesn't cause BufEnter or BufWinEnter autocmds", function() + it("does not trigger BufEnter, BufWinEnter", function() command("let g:fired = v:false") command("au BufEnter,BufWinEnter * let g:fired = v:true") @@ -1818,7 +1818,7 @@ describe('API', function() eq(false, eval('g:fired')) end) - it('|scratch-buffer|', function() + it('scratch-buffer', function() eq({id=2}, meths.create_buf(false, true)) eq({id=3}, meths.create_buf(true, true)) eq({id=4}, meths.create_buf(true, true)) @@ -1845,6 +1845,7 @@ describe('API', function() eq('nofile', meths.buf_get_option(b, 'buftype')) eq('hide', meths.buf_get_option(b, 'bufhidden')) eq(false, meths.buf_get_option(b, 'swapfile')) + eq(false, meths.buf_get_option(b, 'modeline')) end -- @@ -1860,8 +1861,9 @@ describe('API', function() eq('nofile', meths.buf_get_option(edited_buf, 'buftype')) eq('hide', meths.buf_get_option(edited_buf, 'bufhidden')) eq(false, meths.buf_get_option(edited_buf, 'swapfile')) + eq(false, meths.buf_get_option(edited_buf, 'modeline')) - -- scratch buffer can be wiped without error + -- Scratch buffer can be wiped without error. command('bwipe') screen:expect([[ ^ | |