diff options
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | test/functional/autocmd/tabnewentered_spec.lua | 50 |
2 files changed, 25 insertions, 27 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 06c0678aca..8c2b7786a7 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3327,8 +3327,6 @@ A jump table for the options with a short description can be found at |Q_op|. - no highlighting : use a highlight group The default is used for occasions that are not included. - If you want to change what the display modes do, see |dos-colors| - for an example. When using the ':' display mode, this must be followed by the name of a highlight group. A highlight group can be used to define any type of highlighting, including using color. See |:highlight| on how to diff --git a/test/functional/autocmd/tabnewentered_spec.lua b/test/functional/autocmd/tabnewentered_spec.lua index 7fa3dddb93..7044307399 100644 --- a/test/functional/autocmd/tabnewentered_spec.lua +++ b/test/functional/autocmd/tabnewentered_spec.lua @@ -2,30 +2,30 @@ local helpers = require('test.functional.helpers')(after_each) local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq describe('TabNewEntered', function() - describe('au TabNewEntered', function() - describe('with * as <afile>', function() - it('matches when entering any new tab', function() - clear() - nvim('command', 'au! TabNewEntered * echom "tabnewentered:".tabpagenr().":".bufnr("")') - eq("\ntabnewentered:2:2", nvim('command_output', 'tabnew')) - eq("\n\"test.x2\" [New File]\ntabnewentered:3:3", nvim('command_output', 'tabnew test.x2')) - end) - end) - describe('with FILE as <afile>', function() - it('matches when opening a new tab for FILE', function() - local tmp_path = nvim('eval', 'tempname()') - nvim('command', 'au! TabNewEntered '..tmp_path..' echom "tabnewentered:match"') - eq("\n\""..tmp_path.."\" [New File]\ntabnewentered:4:4\ntabnewentered:match", nvim('command_output', 'tabnew '..tmp_path)) - end) - end) - describe('with CTRL-W T', function() - it('works when opening a new tab with CTRL-W T', function() - clear() - nvim('command', 'au! TabNewEntered * echom "entered"') - nvim('command', 'tabnew test.x2') - nvim('command', 'split') - eq('\nentered', nvim('command_output', 'execute "normal \\<C-W>T"')) - end) - end) + describe('au TabNewEntered', function() + describe('with * as <afile>', function() + it('matches when entering any new tab', function() + clear() + nvim('command', 'au! TabNewEntered * echom "tabnewentered:".tabpagenr().":".bufnr("")') + eq("\ntabnewentered:2:2", nvim('command_output', 'tabnew')) + eq("\n\"test.x2\" [New File]\ntabnewentered:3:3", nvim('command_output', 'tabnew test.x2')) + end) end) + describe('with FILE as <afile>', function() + it('matches when opening a new tab for FILE', function() + local tmp_path = nvim('eval', 'tempname()') + nvim('command', 'au! TabNewEntered '..tmp_path..' echom "tabnewentered:match"') + eq("\n\""..tmp_path.."\" [New File]\ntabnewentered:4:4\ntabnewentered:match", nvim('command_output', 'tabnew '..tmp_path)) + end) + end) + describe('with CTRL-W T', function() + it('works when opening a new tab with CTRL-W T', function() + clear() + nvim('command', 'au! TabNewEntered * echom "entered"') + nvim('command', 'tabnew test.x2') + nvim('command', 'split') + eq('\nentered', nvim('command_output', 'execute "normal \\<C-W>T"')) + end) + end) + end) end) |