diff options
Diffstat (limited to 'test/functional')
37 files changed, 2266 insertions, 1458 deletions
diff --git a/test/functional/api/autocmd_spec.lua b/test/functional/api/autocmd_spec.lua index 41de308a2c..c08c411de1 100644 --- a/test/functional/api/autocmd_spec.lua +++ b/test/functional/api/autocmd_spec.lua @@ -230,6 +230,34 @@ describe('autocmd api', function() }, meths.get_var("autocmd_args")) end) + + it('can receive arbitrary data', function() + local function test(data) + eq(data, exec_lua([[ + local input = ... + local output + vim.api.nvim_create_autocmd("User", { + pattern = "Test", + callback = function(args) + output = args.data + end, + }) + + vim.api.nvim_exec_autocmds("User", { + pattern = "Test", + data = input, + }) + + return output + ]], data)) + end + + test("Hello") + test(42) + test(true) + test({ "list" }) + test({ foo = "bar" }) + end) end) describe('nvim_get_autocmds', function() diff --git a/test/functional/api/buffer_updates_spec.lua b/test/functional/api/buffer_updates_spec.lua index fc09e4cde0..2728dcf74c 100644 --- a/test/functional/api/buffer_updates_spec.lua +++ b/test/functional/api/buffer_updates_spec.lua @@ -785,7 +785,8 @@ describe('API: buffer events:', function() local function lines_subset(first, second) for i = 1,#first do - if first[i] ~= second[i] then + -- need to ignore trailing spaces + if first[i]:gsub(' +$', '') ~= second[i]:gsub(' +$', '') then return false end end @@ -827,7 +828,6 @@ describe('API: buffer events:', function() end it('when :terminal lines change', function() - if helpers.pending_win32(pending) then return end local buffer_lines = {} local expected_lines = {} command('terminal "'..nvim_prog..'" -u NONE -i NONE -n -c "set shortmess+=A"') diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index d68f299277..c4748cc00d 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -1,5 +1,6 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') +local lfs = require('lfs') local fmt = string.format local assert_alive = helpers.assert_alive @@ -25,6 +26,7 @@ local tmpname = helpers.tmpname local write_file = helpers.write_file local exec_lua = helpers.exec_lua local exc_exec = helpers.exc_exec +local insert = helpers.insert local pcall_err = helpers.pcall_err local format_string = helpers.format_string @@ -3042,6 +3044,10 @@ describe('API', function() eq('fillchar must be a single character', pcall_err(meths.eval_statusline, '', { fillchar = 1 })) end) + it('rejects invalid string', function() + eq('E539: Illegal character <}>', + pcall_err(meths.eval_statusline, '%{%}', {})) + end) describe('highlight parsing', function() it('works', function() eq({ @@ -3096,6 +3102,19 @@ describe('API', function() 'TextWithNoHighlight%#WarningMsg#TextWithWarningHighlight', { use_tabline = true, highlights = true })) end) + it('works with winbar', function() + eq({ + str = 'TextWithNoHighlightTextWithWarningHighlight', + width = 43, + highlights = { + { start = 0, group = 'WinBar' }, + { start = 19, group = 'WarningMsg' } + } + }, + meths.eval_statusline( + 'TextWithNoHighlight%#WarningMsg#TextWithWarningHighlight', + { use_winbar = true, highlights = true })) + end) end) end) describe('nvim_parse_cmd', function() @@ -3473,4 +3492,149 @@ describe('API', function() pcall_err(meths.parse_cmd, '4,6Fubar', {})) end) end) + describe('nvim_cmd', function() + it('works', function () + meths.cmd({ cmd = "set", args = { "cursorline" } }, {}) + eq(true, meths.get_option_value("cursorline", {})) + end) + it('captures output', function() + eq("foo", meths.cmd({ cmd = "echo", args = { '"foo"' } }, { output = true })) + end) + it('sets correct script context', function() + meths.cmd({ cmd = "set", args = { "cursorline" } }, {}) + local str = meths.exec([[verbose set cursorline?]], true) + neq(nil, str:find("cursorline\n\tLast set from API client %(channel id %d+%)")) + end) + it('works with range', function() + insert [[ + line1 + line2 + line3 + line4 + you didn't expect this + line5 + line6 + ]] + meths.cmd({ cmd = "del", range = {2, 4} }, {}) + expect [[ + line1 + you didn't expect this + line5 + line6 + ]] + end) + it('works with count', function() + insert [[ + line1 + line2 + line3 + line4 + you didn't expect this + line5 + line6 + ]] + meths.cmd({ cmd = "del", range = { 2 }, count = 4 }, {}) + expect [[ + line1 + line5 + line6 + ]] + end) + it('works with register', function() + insert [[ + line1 + line2 + line3 + line4 + you didn't expect this + line5 + line6 + ]] + meths.cmd({ cmd = "del", range = { 2, 4 }, reg = 'a' }, {}) + meths.exec("1put a", false) + expect [[ + line1 + line2 + line3 + line4 + you didn't expect this + line5 + line6 + ]] + end) + it('works with bang', function () + meths.create_user_command("Foo", 'echo "<bang>"', { bang = true }) + eq("!", meths.cmd({ cmd = "Foo", bang = true }, { output = true })) + eq("", meths.cmd({ cmd = "Foo", bang = false }, { output = true })) + end) + it('works with modifiers', function() + meths.create_user_command("Foo", 'set verbose', {}) + eq(" verbose=1", meths.cmd({ cmd = "Foo", mods = { verbose = 1 } }, { output = true })) + eq(0, meths.get_option_value("verbose", {})) + end) + it('works with magic.file', function() + exec_lua([[ + vim.api.nvim_create_user_command("Foo", function(opts) + vim.api.nvim_echo({{ opts.fargs[1] }}, false, {}) + end, { nargs = 1 }) + ]]) + eq(lfs.currentdir(), + meths.cmd({ cmd = "Foo", args = { '%:p:h' }, magic = { file = true } }, + { output = true })) + end) + it('splits arguments correctly', function() + meths.exec([[ + function! FooFunc(...) + echo a:000 + endfunction + ]], false) + meths.create_user_command("Foo", "call FooFunc(<f-args>)", { nargs = '+' }) + eq([=[['a quick', 'brown fox', 'jumps over the', 'lazy dog']]=], + meths.cmd({ cmd = "Foo", args = { "a quick", "brown fox", "jumps over the", "lazy dog"}}, + { output = true })) + eq([=[['test \ \\ \"""\', 'more\ tests\" ']]=], + meths.cmd({ cmd = "Foo", args = { [[test \ \\ \"""\]], [[more\ tests\" ]] } }, + { output = true })) + end) + it('splits arguments correctly for Lua callback', function() + meths.exec_lua([[ + local function FooFunc(opts) + vim.pretty_print(opts.fargs) + end + + vim.api.nvim_create_user_command("Foo", FooFunc, { nargs = '+' }) + ]], {}) + eq([[{ "a quick", "brown fox", "jumps over the", "lazy dog" }]], + meths.cmd({ cmd = "Foo", args = { "a quick", "brown fox", "jumps over the", "lazy dog"}}, + { output = true })) + eq([[{ 'test \\ \\\\ \\"""\\', 'more\\ tests\\" ' }]], + meths.cmd({ cmd = "Foo", args = { [[test \ \\ \"""\]], [[more\ tests\" ]] } }, + { output = true })) + end) + it('works with buffer names', function() + command("edit foo.txt | edit bar.txt") + meths.cmd({ cmd = "buffer", args = { "foo.txt" } }, {}) + eq("foo.txt", funcs.fnamemodify(meths.buf_get_name(0), ":t")) + meths.cmd({ cmd = "buffer", args = { "bar.txt" } }, {}) + eq("bar.txt", funcs.fnamemodify(meths.buf_get_name(0), ":t")) + end) + it('triggers CmdUndefined event if command is not found', function() + meths.exec_lua([[ + vim.api.nvim_create_autocmd("CmdUndefined", + { pattern = "Foo", + callback = function() + vim.api.nvim_create_user_command("Foo", "echo 'foo'", {}) + end + }) + ]], {}) + eq("foo", meths.cmd({ cmd = "Foo" }, { output = true })) + end) + it('errors if command is not implemented', function() + eq("Command not implemented: popup", pcall_err(meths.cmd, { cmd = "popup" }, {})) + end) + it('works with empty arguments list', function() + meths.cmd({ cmd = "update" }, {}) + meths.cmd({ cmd = "buffer", count = 0 }, {}) + end) + end) end) diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index c31ab2060a..9aacac37bf 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -166,23 +166,23 @@ describe('API/win', function() local oldwin = curwin() command('vsplit') screen:expect([[ - aaa {4:│}aaa | - bbb {4:│}bbb | - ccc {4:│}ccc | - {2:dd^d }{4:│}{2:ddd }| - {1:~ }{4:│}{1:~ }| - {1:~ }{4:│}{1:~ }| + aaa │aaa | + bbb │bbb | + ccc │ccc | + {2:dd^d }│{2:ddd }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| {3:[No Name] [+] 4,3 All }{4:[No Name] [+] 4,3 All}| | ]]) window('set_cursor', oldwin, {1, 0}) screen:expect([[ - aaa {4:│}{2:aaa }| - bbb {4:│}bbb | - ccc {4:│}ccc | - {2:dd^d }{4:│}ddd | - {1:~ }{4:│}{1:~ }| - {1:~ }{4:│}{1:~ }| + aaa │{2:aaa }| + bbb │bbb | + ccc │ccc | + {2:dd^d }│ddd | + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| {3:[No Name] [+] 4,3 All }{4:[No Name] [+] 1,1 All}| | ]]) diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 20ea3621f0..f87fd8e951 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -53,7 +53,6 @@ describe('startup', function() ]]) end) it('in a TTY: has("ttyin")==1 has("ttyout")==1', function() - if helpers.pending_win32(pending) then return end local screen = Screen.new(25, 4) screen:attach() if iswin() then @@ -105,7 +104,6 @@ describe('startup', function() end) end) it('input from pipe (implicit) #7679', function() - if helpers.pending_win32(pending) then return end local screen = Screen.new(25, 4) screen:attach() if iswin() then @@ -261,7 +259,6 @@ describe('startup', function() end) it('ENTER dismisses early message #7967', function() - if helpers.pending_win32(pending) then return end local screen screen = Screen.new(60, 6) screen:attach() @@ -494,14 +491,14 @@ describe('sysinit', function() end) it('fixed hang issue with -D (#12647)', function() - if helpers.pending_win32(pending) then return end local screen - screen = Screen.new(60, 6) + screen = Screen.new(60, 7) screen:attach() command([[let g:id = termopen('"]]..nvim_prog.. [[" -u NONE -i NONE --cmd "set noruler" -D')]]) screen:expect([[ ^ | + | Entering Debug mode. Type "cont" to continue. | cmd: augroup nvim_terminal | > | @@ -512,6 +509,7 @@ describe('sysinit', function() screen:expect([[ ^ | ~ | + ~ | [No Name] | | <" -u NONE -i NONE --cmd "set noruler" -D 1,0-1 All| diff --git a/test/functional/editor/tabpage_spec.lua b/test/functional/editor/tabpage_spec.lua index 2494daf99b..3b2c1db350 100644 --- a/test/functional/editor/tabpage_spec.lua +++ b/test/functional/editor/tabpage_spec.lua @@ -7,6 +7,7 @@ local neq = helpers.neq local feed = helpers.feed local eval = helpers.eval local exec = helpers.exec +local funcs = helpers.funcs describe('tabpage', function() before_each(clear) @@ -51,5 +52,13 @@ describe('tabpage', function() ]]) neq(999, eval('g:win_closed')) end) -end) + it(":tabmove handles modifiers and addr", function() + command('tabnew | tabnew | tabnew') + eq(4, funcs.nvim_tabpage_get_number(0)) + command(' silent :keepalt :: ::: silent! - tabmove') + eq(3, funcs.nvim_tabpage_get_number(0)) + command(' silent :keepalt :: ::: silent! -2 tabmove') + eq(1, funcs.nvim_tabpage_get_number(0)) + end) +end) diff --git a/test/functional/ex_cmds/drop_spec.lua b/test/functional/ex_cmds/drop_spec.lua index 9d84a2d4f6..2537ab9cdc 100644 --- a/test/functional/ex_cmds/drop_spec.lua +++ b/test/functional/ex_cmds/drop_spec.lua @@ -41,14 +41,14 @@ describe(":drop", function() feed_command("edit tmp2") feed_command("drop tmp1") screen:expect([[ - {2:│}^ | - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| + │^ | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| {2:tmp2 }{1:tmp1 }| :drop tmp1 | ]]) @@ -62,14 +62,14 @@ describe(":drop", function() feed("iABC<esc>") feed_command("drop tmp3") screen:expect([[ - ^ {2:│} | - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {1:tmp3 }{2:│}{0:~ }| - ABC {2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }| + ^ │ | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {1:tmp3 }│{0:~ }| + ABC │{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| {2:tmp2 [+] tmp1 }| "tmp3" [New] | ]]) diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua index 2702fb196f..c1b4777d16 100644 --- a/test/functional/ex_cmds/mksession_spec.lua +++ b/test/functional/ex_cmds/mksession_spec.lua @@ -1,20 +1,22 @@ local lfs = require('lfs') local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') local clear = helpers.clear local command = helpers.command local get_pathsep = helpers.get_pathsep +local iswin = helpers.iswin local eq = helpers.eq local neq = helpers.neq local funcs = helpers.funcs local matches = helpers.matches local pesc = helpers.pesc local rmdir = helpers.rmdir +local sleep = helpers.sleep local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec' describe(':mksession', function() - if helpers.pending_win32(pending) then return end local session_file = file_prefix .. '.vim' local tab_dir = file_prefix .. '.d' @@ -103,9 +105,13 @@ describe(':mksession', function() local session_path = cwd_dir..'/'..session_file command('cd '..tab_dir) - command('terminal echo $PWD') + command('terminal') command('cd '..cwd_dir) command('mksession '..session_path) + command('bdelete!') + if iswin() then + sleep(100) -- Make sure all child processes have exited. + end command('qall!') -- Create a new test instance of Nvim. @@ -114,6 +120,50 @@ describe(':mksession', function() local expected_cwd = cwd_dir..'/'..tab_dir matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%')) + command('bdelete!') + if iswin() then + sleep(100) -- Make sure all child processes have exited. + end + end) + + it('restores CWD for :terminal buffer at root directory #16988', function() + if iswin() then + pending('N/A for Windows') + return + end + + local screen + local cwd_dir = funcs.fnamemodify('.', ':p:~'):gsub([[[\/]*$]], '') + local session_path = cwd_dir..'/'..session_file + + screen = Screen.new(50, 6) + screen:attach({rgb=false}) + local expected_screen = [[ + ^/ | + | + [Process exited 0] | + | + | + | + ]] + + command('cd /') + command('terminal echo $PWD') + + -- Verify that the terminal's working directory is "/". + screen:expect(expected_screen) + + command('cd '..cwd_dir) + command('mksession '..session_path) command('qall!') + + -- Create a new test instance of Nvim. + clear() + screen = Screen.new(50, 6) + screen:attach({rgb=false}) + command('silent source '..session_path) + + -- Verify that the terminal's working directory is "/". + screen:expect(expected_screen) end) end) diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua index f589f5955f..86cdf4ef56 100644 --- a/test/functional/fixtures/fake-lsp-server.lua +++ b/test/functional/fixtures/fake-lsp-server.lua @@ -766,8 +766,21 @@ function tests.code_action_filter() isPreferred = true, command = 'preferred_command', } + local quickfix_action = { + title = 'Action 3', + kind = 'quickfix', + command = 'quickfix_command', + } + local quickfix_foo_action = { + title = 'Action 4', + kind = 'quickfix.foo', + command = 'quickfix_foo_command', + } + expect_request('textDocument/codeAction', function() + return nil, { action, preferred_action, quickfix_action, quickfix_foo_action, } + end) expect_request('textDocument/codeAction', function() - return nil, { action, preferred_action, } + return nil, { action, preferred_action, quickfix_action, quickfix_foo_action, } end) notify('shutdown') end; diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index e9c3d4bd92..3d64625752 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -41,10 +41,8 @@ module.nvim_set = ( module.nvim_argv = { module.nvim_prog, '-u', 'NONE', '-i', 'NONE', '--cmd', module.nvim_set, - '--cmd', 'unmap Y', - '--cmd', 'unmap <C-L>', - '--cmd', 'iunmap <C-U>', - '--cmd', 'iunmap <C-W>', + '--cmd', 'mapclear', + '--cmd', 'mapclear!', '--embed'} -- Directory containing nvim. diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 4c7915403c..ccc709cbf6 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -71,14 +71,14 @@ describe('display', function() 100wincmd < ]]) screen:expect([[ - ^a{3:│}aaa | - a{3:│}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| - a{3:│}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | - b{3:│}{1:~ }| - b{3:│}{1:~ }| - b{3:│}{1:~ }| - b{3:│}{1:~ }| - {1:@}{3:│}{1:~ }| + ^a│aaa | + a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | + b│{1:~ }| + b│{1:~ }| + b│{1:~ }| + b│{1:~ }| + {1:@}│{1:~ }| {2:< }{3:[No Name] [+] }| | ]]) @@ -86,14 +86,14 @@ describe('display', function() screen:expect_unchanged() command('100wincmd >') screen:expect([[ - ^aaa {3:│}a| - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb{3:│}a| - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {3:│}a| - {1:~ }{3:│}b| - {1:~ }{3:│}b| - {1:~ }{3:│}b| - {1:~ }{3:│}b| - {1:~ }{3:│}{1:@}| + ^aaa │a| + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│a| + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb │a| + {1:~ }│b| + {1:~ }│b| + {1:~ }│b| + {1:~ }│b| + {1:~ }│{1:@}| {2:[No Name] [+] }{3:<}| | ]]) diff --git a/test/functional/legacy/listchars_spec.lua b/test/functional/legacy/listchars_spec.lua index 206e226767..a94ec431d4 100644 --- a/test/functional/legacy/listchars_spec.lua +++ b/test/functional/legacy/listchars_spec.lua @@ -117,106 +117,106 @@ describe("'listchars'", function() ]]) feed('13<C-W>>') screen:expect([[ - {4: }aaa {3:│}{4: }a{1:>}{3:│}{4: }^aaa | - {4: } {3:│}{4: } {3:│}{4: } | - {4: }a {3:│}{4: }a {3:│}{4: }a | - {4: }aaaaaa {3:│}{4: }a{1:>}{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| + {4: }aaa │{4: }a{1:>}│{4: }^aaa | + {4: } │{4: } │{4: } | + {4: }a │{4: }a │{4: }a | + {4: }aaaaaa │{4: }a{1:>}│{4: }aaaaaa | + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| {3:[No Name] [+] <[+] }{2:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa {3:│}{4: }{1:>}{3:│}{4: }^aaa | - {4: } {3:│}{4: } {3:│}{4: } | - {4: }a {3:│}{4: }a{3:│}{4: }a | - {4: }aaaaaa {3:│}{4: }{1:>}{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| + {4: }aaa │{4: }{1:>}│{4: }^aaa | + {4: } │{4: } │{4: } | + {4: }a │{4: }a│{4: }a | + {4: }aaaaaa │{4: }{1:>}│{4: }aaaaaa | + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| {3:[No Name] [+] <+] }{2:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa {3:│}{4: }{3:│}{4: }^aaa | - {4: } {3:│}{4: }{3:│}{4: } | - {4: }a {3:│}{4: }{3:│}{4: }a | - {4: }aaaaaa {3:│}{4: }{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| + {4: }aaa │{4: }│{4: }^aaa | + {4: } │{4: }│{4: } | + {4: }a │{4: }│{4: }a | + {4: }aaaaaa │{4: }│{4: }aaaaaa | + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| {3:[No Name] [+] <] }{2:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa {3:│}{4: }{3:│}{4: }^aaa | - {4: } {3:│}{4: }{3:│}{4: } | - {4: }a {3:│}{4: }{3:│}{4: }a | - {4: }aaaaaa {3:│}{4: }{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| + {4: }aaa │{4: }│{4: }^aaa | + {4: } │{4: }│{4: } | + {4: }a │{4: }│{4: }a | + {4: }aaaaaa │{4: }│{4: }aaaaaa | + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| {3:[No Name] [+] < }{2:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa {3:│}{4: }{3:│}{4: }^aaa | - {4: } {3:│}{4: }{3:│}{4: } | - {4: }a {3:│}{4: }{3:│}{4: }a | - {4: }aaaaaa {3:│}{4: }{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~}{3:│}{1:~ }| - {1:~ }{3:│}{1:~}{3:│}{1:~ }| - {1:~ }{3:│}{1:~}{3:│}{1:~ }| - {1:~ }{3:│}{1:~}{3:│}{1:~ }| + {4: }aaa │{4: }│{4: }^aaa | + {4: } │{4: }│{4: } | + {4: }a │{4: }│{4: }a | + {4: }aaaaaa │{4: }│{4: }aaaaaa | + {1:~ }│{1:~}│{1:~ }| + {1:~ }│{1:~}│{1:~ }| + {1:~ }│{1:~}│{1:~ }| + {1:~ }│{1:~}│{1:~ }| {3:[No Name] [+] < }{2:[No Name] [+] }| | ]]) feed('<C-W>h') feed_command('set nowrap foldcolumn=4') screen:expect([[ - {4: }aaa {3:│}{4: }^aaa {3:│}{4: }aaa | - {4: } {3:│}{4: } {3:│}{4: } | - {4: }a {3:│}{4: }a {3:│}{4: }a | - {4: }aaaaaa {3:│}{4: }aaaaaa {3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| + {4: }aaa │{4: }^aaa │{4: }aaa | + {4: } │{4: } │{4: } | + {4: }a │{4: }a │{4: }a | + {4: }aaaaaa │{4: }aaaaaa │{4: }aaaaaa | + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }{3:[No Name] [+] }| :set nowrap foldcolumn=4 | ]]) feed('15<C-W><lt>') screen:expect([[ - {4: }aaa {3:│}{4: }{3:│}{4: }aaa | - {4: } {3:│}{4: }{3:│}{4: } | - {4: }a {3:│}{4: }{3:│}{4: }a | - {4: }aaaaaa {3:│}{4: ^ }{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }{3:│}{1:~ }| + {4: }aaa │{4: }│{4: }aaa | + {4: } │{4: }│{4: } | + {4: }a │{4: }│{4: }a | + {4: }aaaaaa │{4: ^ }│{4: }aaaaaa | + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| + {1:~ }│{1:~ }│{1:~ }| {3:[No Name] [+] }{2:<[+] }{3:[No Name] [+] }| :set nowrap foldcolumn=4 | ]]) feed('4<C-W><lt>') screen:expect([[ - {4: }aaa {3:│}{4: }{3:│}{4: }aaa | - {4: } {3:│}{4: }{3:│}{4: } | - {4: }a {3:│}{4: }{3:│}{4: }a | - {4: }aaaaaa {3:│}{4:^ }{3:│}{4: }aaaaaa | - {1:~ }{3:│}{1:~}{3:│}{1:~ }| - {1:~ }{3:│}{1:~}{3:│}{1:~ }| - {1:~ }{3:│}{1:~}{3:│}{1:~ }| - {1:~ }{3:│}{1:~}{3:│}{1:~ }| + {4: }aaa │{4: }│{4: }aaa | + {4: } │{4: }│{4: } | + {4: }a │{4: }│{4: }a | + {4: }aaaaaa │{4:^ }│{4: }aaaaaa | + {1:~ }│{1:~}│{1:~ }| + {1:~ }│{1:~}│{1:~ }| + {1:~ }│{1:~}│{1:~ }| + {1:~ }│{1:~}│{1:~ }| {3:[No Name] [+] }{2:< }{3:[No Name] [+] }| :set nowrap foldcolumn=4 | ]]) diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua index 4ed08881de..67991f5d48 100644 --- a/test/functional/legacy/search_spec.lua +++ b/test/functional/legacy/search_spec.lua @@ -7,6 +7,7 @@ local eval = helpers.eval local feed = helpers.feed local funcs = helpers.funcs local poke_eventloop = helpers.poke_eventloop +local exec = helpers.exec describe('search cmdline', function() local screen @@ -640,3 +641,34 @@ describe('search cmdline', function() feed('<esc>') end) end) + +describe('Search highlight', function() + before_each(clear) + it('Search highlight is combined with Visual highlight vim-patch:8.2.2797', function() + local screen = Screen.new(40, 6) + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [2] = {bold = true}, -- ModeMsg, Search + [3] = {background = Screen.colors.LightGrey}, -- Visual + [4] = {background = Screen.colors.Yellow, bold = true}, -- Search + [5] = {background = Screen.colors.LightGrey, bold = true}, -- Visual + Search + }) + screen:attach() + exec([[ + set hlsearch noincsearch + call setline(1, repeat(["xxx yyy zzz"], 3)) + hi Search gui=bold + /yyy + call cursor(1, 6) + ]]) + feed('vjj') + screen:expect([[ + xxx {4:y}{5:yy}{3: zzz} | + {3:xxx }{5:yyy}{3: zzz} | + {3:xxx }{5:y}{4:^yy} zzz | + {1:~ }| + {1:~ }| + {2:-- VISUAL --} | + ]]) + end) +end) diff --git a/test/functional/legacy/statusline_spec.lua b/test/functional/legacy/statusline_spec.lua new file mode 100644 index 0000000000..5eb46077ec --- /dev/null +++ b/test/functional/legacy/statusline_spec.lua @@ -0,0 +1,71 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear = helpers.clear +local exec = helpers.exec +local feed = helpers.feed + +before_each(clear) + +describe('statusline', function() + local screen + + before_each(function() + screen = Screen.new(50, 7) + screen:attach() + end) + + it('is updated in cmdline mode when using window-local statusline vim-patch:8.2.2737', function() + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [2] = {bold = true, reverse = true}, -- StatusLine + [3] = {reverse = true}, -- StatusLineNC, VertSplit + }) + exec([[ + setlocal statusline=-%{mode()}- + split + setlocal statusline=+%{mode()}+ + ]]) + screen:expect([[ + ^ | + {1:~ }| + {2:+n+ }| + | + {1:~ }| + {3:-n- }| + | + ]]) + feed(':') + screen:expect([[ + | + {1:~ }| + {2:+c+ }| + | + {1:~ }| + {3:-c- }| + :^ | + ]]) + end) + + it('truncated item does not cause off-by-one highlight vim-patch:8.2.4929', function() + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [2] = {foreground = Screen.colors.Blue}, -- User1 + [3] = {background = Screen.colors.Red, foreground = Screen.colors.White}, -- User2 + }) + exec([[ + set laststatus=2 + hi! link User1 Directory + hi! link User2 ErrorMsg + set statusline=%.5(%1*ABC%2*DEF%1*GHI%) + ]]) + screen:expect([[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {3:<F}{2:GHI }| + | + ]]) + end) +end) diff --git a/test/functional/options/cursorbind_spec.lua b/test/functional/options/cursorbind_spec.lua index f762808dd6..fcb753451c 100644 --- a/test/functional/options/cursorbind_spec.lua +++ b/test/functional/options/cursorbind_spec.lua @@ -30,23 +30,23 @@ describe("'cursorbind'", function() ]]) feed('20l') screen:expect([[ - a bb cc dd ee ff gg {3:│}aa bb cc dd ee ff gg^ hh ii jj kk ll mm | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {1:~ }{3:│}{1:~ }| + a bb cc dd ee ff gg │aa bb cc dd ee ff gg^ hh ii jj kk ll mm | + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) feed('10l') screen:expect([[ - hh ii jj kk ll mm n{3:│}aa bb cc dd ee ff gg hh ii jj ^kk ll mm | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {1:~ }{3:│}{1:~ }| + hh ii jj kk ll mm n│aa bb cc dd ee ff gg hh ii jj ^kk ll mm | + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -54,23 +54,23 @@ describe("'cursorbind'", function() feed('0') feed('20l') screen:expect([[ - {4:a bb cc dd ee ff gg }{3:│}{4:aa bb cc dd ee ff gg^ hh ii jj kk ll mm }| - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {1:~ }{3:│}{1:~ }| + {4:a bb cc dd ee ff gg }│{4:aa bb cc dd ee ff gg^ hh ii jj kk ll mm }| + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) feed('10l') screen:expect([[ - {4: hh ii jj kk ll mm n}{3:│}{4:aa bb cc dd ee ff gg hh ii jj ^kk ll mm }| - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {1:~ }{3:│}{1:~ }| + {4: hh ii jj kk ll mm n}│{4:aa bb cc dd ee ff gg hh ii jj ^kk ll mm }| + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -78,12 +78,12 @@ describe("'cursorbind'", function() feed('0') feed('40l') screen:expect([[ - kk ll mm nn oo pp qq{3:│} bb cc dd ee ff gg hh ii jj kk ll mm n^n| - {3:│} | - {3:│} | - {3:│} | - {3:│} | - {1:~ }{3:│}{1:~ }| + kk ll mm nn oo pp qq│ bb cc dd ee ff gg hh ii jj kk ll mm n^n| + │ | + │ | + │ | + │ | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua index 6620c9acef..4731df7b95 100644 --- a/test/functional/options/defaults_spec.lua +++ b/test/functional/options/defaults_spec.lua @@ -163,7 +163,7 @@ describe('startup defaults', function() end) it("'shadafile' ('viminfofile')", function() - local env = {XDG_DATA_HOME='Xtest-userdata', XDG_CONFIG_HOME='Xtest-userconfig'} + local env = {XDG_DATA_HOME='Xtest-userdata', XDG_STATE_HOME='Xtest-userstate', XDG_CONFIG_HOME='Xtest-userconfig'} clear{args={}, args_rm={'-i'}, env=env} -- Default 'shadafile' is empty. -- This means use the default location. :help shada-file-name @@ -178,7 +178,7 @@ describe('startup defaults', function() clear{args={}, args_rm={'-i'}, env=env} eq({ f }, eval('v:oldfiles')) os.remove('Xtest-foo') - rmdir('Xtest-userdata') + rmdir('Xtest-userstate') -- Handles viminfo/viminfofile as alias for shada/shadafile. eq('\n shadafile=', eval('execute("set shadafile?")')) @@ -206,7 +206,7 @@ describe('startup defaults', function() describe('$NVIM_LOG_FILE', function() local xdgdir = 'Xtest-startup-xdg-logpath' - local xdgcachedir = xdgdir..'/nvim' + local xdgstatedir = iswin() and xdgdir..'/nvim-data' or xdgdir..'/nvim' after_each(function() os.remove('Xtest-logpath') rmdir(xdgdir) @@ -218,21 +218,21 @@ describe('startup defaults', function() }}) eq('Xtest-logpath', eval('$NVIM_LOG_FILE')) end) - it('defaults to stdpath("cache")/log if empty', function() - eq(true, mkdir(xdgdir) and mkdir(xdgcachedir)) + it('defaults to stdpath("log")/log if empty', function() + eq(true, mkdir(xdgdir) and mkdir(xdgstatedir)) clear({env={ - XDG_CACHE_HOME=xdgdir, + XDG_STATE_HOME=xdgdir, NVIM_LOG_FILE='', -- Empty is invalid. }}) - eq(xdgcachedir..'/log', string.gsub(eval('$NVIM_LOG_FILE'), '\\', '/')) + eq(xdgstatedir..'/log', string.gsub(eval('$NVIM_LOG_FILE'), '\\', '/')) end) - it('defaults to stdpath("cache")/log if invalid', function() - eq(true, mkdir(xdgdir) and mkdir(xdgcachedir)) + it('defaults to stdpath("log")/log if invalid', function() + eq(true, mkdir(xdgdir) and mkdir(xdgstatedir)) clear({env={ - XDG_CACHE_HOME=xdgdir, + XDG_STATE_HOME=xdgdir, NVIM_LOG_FILE='.', -- Any directory is invalid. }}) - eq(xdgcachedir..'/log', string.gsub(eval('$NVIM_LOG_FILE'), '\\', '/')) + eq(xdgstatedir..'/log', string.gsub(eval('$NVIM_LOG_FILE'), '\\', '/')) end) end) end) @@ -264,6 +264,7 @@ describe('XDG-based defaults', function() XDG_CONFIG_HOME=nil, XDG_DATA_HOME=nil, XDG_CACHE_HOME=nil, + XDG_STATE_HOME=nil, XDG_RUNTIME_DIR=nil, XDG_CONFIG_DIRS=nil, XDG_DATA_DIRS=nil, @@ -293,6 +294,7 @@ describe('XDG-based defaults', function() local env_sep = iswin() and ';' or ':' local data_dir = iswin() and 'nvim-data' or 'nvim' + local state_dir = iswin() and 'nvim-data' or 'nvim' local root_path = iswin() and 'C:' or '' describe('with too long XDG variables', function() @@ -303,6 +305,7 @@ describe('XDG-based defaults', function() .. env_sep.. root_path .. ('/b'):rep(2048) .. (env_sep .. root_path .. '/c'):rep(512)), XDG_DATA_HOME=(root_path .. ('/X'):rep(4096)), + XDG_STATE_HOME=(root_path .. ('/X'):rep(4096)), XDG_DATA_DIRS=(root_path .. ('/A'):rep(2048) .. env_sep .. root_path .. ('/B'):rep(2048) .. (env_sep .. root_path .. '/C'):rep(512)), @@ -355,13 +358,13 @@ describe('XDG-based defaults', function() .. ',' .. root_path .. ('/a'):rep(2048) .. '/nvim/after' .. ',' .. root_path .. ('/x'):rep(4096) .. '/nvim/after' ):gsub('\\', '/')), (meths.get_option('runtimepath')):gsub('\\', '/')) - eq('.,' .. root_path .. ('/X'):rep(4096).. '/' .. data_dir .. '/backup//', + eq('.,' .. root_path .. ('/X'):rep(4096).. '/' .. state_dir .. '/backup//', (meths.get_option('backupdir'):gsub('\\', '/'))) - eq(root_path .. ('/X'):rep(4096) .. '/' .. data_dir .. '/swap//', + eq(root_path .. ('/X'):rep(4096) .. '/' .. state_dir .. '/swap//', (meths.get_option('directory')):gsub('\\', '/')) - eq(root_path .. ('/X'):rep(4096) .. '/' .. data_dir .. '/undo//', + eq(root_path .. ('/X'):rep(4096) .. '/' .. state_dir .. '/undo//', (meths.get_option('undodir')):gsub('\\', '/')) - eq(root_path .. ('/X'):rep(4096) .. '/' .. data_dir .. '/view//', + eq(root_path .. ('/X'):rep(4096) .. '/' .. state_dir .. '/view//', (meths.get_option('viewdir')):gsub('\\', '/')) end) end) @@ -372,6 +375,7 @@ describe('XDG-based defaults', function() XDG_CONFIG_HOME='$XDG_DATA_HOME', XDG_CONFIG_DIRS='$XDG_DATA_DIRS', XDG_DATA_HOME='$XDG_CONFIG_HOME', + XDG_STATE_HOME='$XDG_CONFIG_HOME', XDG_DATA_DIRS='$XDG_CONFIG_DIRS', }}) end) @@ -405,13 +409,13 @@ describe('XDG-based defaults', function() .. ',$XDG_DATA_DIRS/nvim/after' .. ',$XDG_DATA_HOME/nvim/after' ):gsub('\\', '/')), (meths.get_option('runtimepath')):gsub('\\', '/')) - eq(('.,$XDG_CONFIG_HOME/' .. data_dir .. '/backup//'), + eq(('.,$XDG_CONFIG_HOME/' .. state_dir .. '/backup//'), meths.get_option('backupdir'):gsub('\\', '/')) - eq(('$XDG_CONFIG_HOME/' .. data_dir .. '/swap//'), + eq(('$XDG_CONFIG_HOME/' .. state_dir .. '/swap//'), meths.get_option('directory'):gsub('\\', '/')) - eq(('$XDG_CONFIG_HOME/' .. data_dir .. '/undo//'), + eq(('$XDG_CONFIG_HOME/' .. state_dir .. '/undo//'), meths.get_option('undodir'):gsub('\\', '/')) - eq(('$XDG_CONFIG_HOME/' .. data_dir .. '/view//'), + eq(('$XDG_CONFIG_HOME/' .. state_dir .. '/view//'), meths.get_option('viewdir'):gsub('\\', '/')) meths.command('set all&') eq(('$XDG_DATA_HOME/nvim' @@ -425,13 +429,13 @@ describe('XDG-based defaults', function() .. ',$XDG_DATA_DIRS/nvim/after' .. ',$XDG_DATA_HOME/nvim/after' ):gsub('\\', '/'), (meths.get_option('runtimepath')):gsub('\\', '/')) - eq(('.,$XDG_CONFIG_HOME/' .. data_dir .. '/backup//'), + eq(('.,$XDG_CONFIG_HOME/' .. state_dir .. '/backup//'), meths.get_option('backupdir'):gsub('\\', '/')) - eq(('$XDG_CONFIG_HOME/' .. data_dir .. '/swap//'), + eq(('$XDG_CONFIG_HOME/' .. state_dir .. '/swap//'), meths.get_option('directory'):gsub('\\', '/')) - eq(('$XDG_CONFIG_HOME/' .. data_dir .. '/undo//'), + eq(('$XDG_CONFIG_HOME/' .. state_dir .. '/undo//'), meths.get_option('undodir'):gsub('\\', '/')) - eq(('$XDG_CONFIG_HOME/' .. data_dir .. '/view//'), + eq(('$XDG_CONFIG_HOME/' .. state_dir .. '/view//'), meths.get_option('viewdir'):gsub('\\', '/')) end) end) @@ -442,6 +446,7 @@ describe('XDG-based defaults', function() XDG_CONFIG_HOME=', , ,', XDG_CONFIG_DIRS=',-,-,' .. env_sep .. '-,-,-', XDG_DATA_HOME=',=,=,', + XDG_STATE_HOME=',=,=,', XDG_DATA_DIRS=',≡,≡,' .. env_sep .. '≡,≡,≡', }}) end) @@ -484,13 +489,13 @@ describe('XDG-based defaults', function() .. ',\\,-\\,-\\,' .. path_sep ..'nvim' .. path_sep ..'after' .. ',\\, \\, \\,' .. path_sep ..'nvim' .. path_sep ..'after' ), meths.get_option('runtimepath')) - eq('.,\\,=\\,=\\,' .. path_sep .. data_dir .. '' .. path_sep ..'backup' .. (path_sep):rep(2), + eq('.,\\,=\\,=\\,' .. path_sep .. state_dir .. '' .. path_sep ..'backup' .. (path_sep):rep(2), meths.get_option('backupdir')) - eq('\\,=\\,=\\,' .. path_sep ..'' .. data_dir .. '' .. path_sep ..'swap' .. (path_sep):rep(2), + eq('\\,=\\,=\\,' .. path_sep ..'' .. state_dir .. '' .. path_sep ..'swap' .. (path_sep):rep(2), meths.get_option('directory')) - eq('\\,=\\,=\\,' .. path_sep ..'' .. data_dir .. '' .. path_sep ..'undo' .. (path_sep):rep(2), + eq('\\,=\\,=\\,' .. path_sep ..'' .. state_dir .. '' .. path_sep ..'undo' .. (path_sep):rep(2), meths.get_option('undodir')) - eq('\\,=\\,=\\,' .. path_sep ..'' .. data_dir .. '' .. path_sep ..'view' .. (path_sep):rep(2), + eq('\\,=\\,=\\,' .. path_sep ..'' .. state_dir .. '' .. path_sep ..'view' .. (path_sep):rep(2), meths.get_option('viewdir')) end) end) @@ -499,8 +504,9 @@ end) describe('stdpath()', function() -- Windows appends 'nvim-data' instead of just 'nvim' to prevent collisions - -- due to XDG_CONFIG_HOME and XDG_DATA_HOME being the same. + -- due to XDG_CONFIG_HOME, XDG_DATA_HOME and XDG_STATE_HOME being the same. local datadir = iswin() and 'nvim-data' or 'nvim' + local statedir = iswin() and 'nvim-data' or 'nvim' local env_sep = iswin() and ';' or ':' it('acceptance', function() @@ -509,6 +515,7 @@ describe('stdpath()', function() eq('nvim', funcs.fnamemodify(funcs.stdpath('cache'), ':t')) eq('nvim', funcs.fnamemodify(funcs.stdpath('config'), ':t')) eq(datadir, funcs.fnamemodify(funcs.stdpath('data'), ':t')) + eq(statedir, funcs.fnamemodify(funcs.stdpath('state'), ':t')) eq('table', type(funcs.stdpath('config_dirs'))) eq('table', type(funcs.stdpath('data_dirs'))) assert_alive() -- Check for crash. #8393 @@ -582,6 +589,39 @@ describe('stdpath()', function() end) end) + describe('with "state"' , function () + it('knows XDG_STATE_HOME', function() + clear({env={ + XDG_STATE_HOME=alter_slashes('/home/docwhat/.local'), + }}) + eq(alter_slashes('/home/docwhat/.local/'..statedir), funcs.stdpath('state')) + end) + + it('handles changes during runtime', function() + clear({env={ + XDG_STATE_HOME=alter_slashes('/home/original'), + }}) + eq(alter_slashes('/home/original/'..statedir), funcs.stdpath('state')) + command("let $XDG_STATE_HOME='"..alter_slashes('/home/new').."'") + eq(alter_slashes('/home/new/'..statedir), funcs.stdpath('state')) + end) + + it("doesn't expand $VARIABLES", function() + clear({env={ + XDG_STATE_HOME='$VARIABLES', + VARIABLES='this-should-not-happen', + }}) + eq(alter_slashes('$VARIABLES/'..statedir), funcs.stdpath('state')) + end) + + it("doesn't expand ~/", function() + clear({env={ + XDG_STATE_HOME=alter_slashes('~/frobnitz'), + }}) + eq(alter_slashes('~/frobnitz/'..statedir), funcs.stdpath('state')) + end) + end) + describe('with "cache"' , function () it('knows XDG_CACHE_HOME', function() clear({env={ diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index 33a8976b79..6c961eff7d 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -18,6 +18,7 @@ local NIL = helpers.NIL local read_file = require('test.helpers').read_file local write_file = require('test.helpers').write_file local isCI = helpers.isCI +local meths = helpers.meths -- Use these to get access to a coroutine so that I can run async tests and use -- yield. @@ -341,6 +342,43 @@ describe('LSP', function() } end) + it('should fire autocommands on attach and detach', function() + local client + test_rpc_server { + test_name = "basic_init"; + on_setup = function() + exec_lua [[ + BUFFER = vim.api.nvim_create_buf(false, true) + vim.api.nvim_create_autocmd('LspAttach', { + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + vim.g.lsp_attached = client.name + end, + }) + vim.api.nvim_create_autocmd('LspDetach', { + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + vim.g.lsp_detached = client.name + end, + }) + ]] + end; + on_init = function(_client) + client = _client + eq(true, exec_lua("return lsp.buf_attach_client(BUFFER, TEST_RPC_CLIENT_ID)")) + client.notify('finish') + end; + on_handler = function(_, _, ctx) + if ctx.method == 'finish' then + eq('basic_init', meths.get_var('lsp_attached')) + exec_lua("return lsp.buf_detach_client(BUFFER, TEST_RPC_CLIENT_ID)") + eq('basic_init', meths.get_var('lsp_detached')) + client.stop() + end + end; + } + end) + it('client should return settings via workspace/configuration handler', function() local expected_handlers = { {NIL, {}, {method="shutdown", client_id=1}}; @@ -2753,12 +2791,33 @@ describe('LSP', function() vim.lsp.commands['executed_preferred'] = function() end end + vim.lsp.commands['quickfix_command'] = function(cmd) + vim.lsp.commands['executed_quickfix'] = function() + end + end local bufnr = vim.api.nvim_get_current_buf() vim.lsp.buf_attach_client(bufnr, TEST_RPC_CLIENT_ID) vim.lsp.buf.code_action({ filter = function(a) return a.isPreferred end, apply = true, }) + vim.lsp.buf.code_action({ + -- expect to be returned actions 'quickfix' and 'quickfix.foo' + context = { only = {'quickfix'}, }, + apply = true, + filter = function(a) + if a.kind == 'quickfix.foo' then + vim.lsp.commands['filtered_quickfix_foo'] = function() end + return false + elseif a.kind == 'quickfix' then + return true + else + assert(nil, 'unreachable') + end + end, + }) ]]) elseif ctx.method == 'shutdown' then eq('function', exec_lua[[return type(vim.lsp.commands['executed_preferred'])]]) + eq('function', exec_lua[[return type(vim.lsp.commands['filtered_quickfix_foo'])]]) + eq('function', exec_lua[[return type(vim.lsp.commands['executed_quickfix'])]]) client.stop() end end diff --git a/test/functional/plugin/man_spec.lua b/test/functional/plugin/man_spec.lua index e5b2e7dc1f..c8da5a711f 100644 --- a/test/functional/plugin/man_spec.lua +++ b/test/functional/plugin/man_spec.lua @@ -2,13 +2,19 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local command, eval, rawfeed = helpers.command, helpers.eval, helpers.rawfeed local clear = helpers.clear +local funcs = helpers.funcs +local nvim_prog = helpers.nvim_prog +local matches = helpers.matches describe(':Man', function() + before_each(function() + clear() + end) + describe('man.lua: highlight_line()', function() local screen before_each(function() - clear() command('syntax on') command('set filetype=man') command('syntax off') -- Ignore syntax groups @@ -137,4 +143,10 @@ describe(':Man', function() ]]) end) end) + + it('q quits in "$MANPAGER mode" (:Man!) #18281', function() + -- This will hang if #18281 regresses. + local args = {nvim_prog, '--headless', '+autocmd VimLeave * echo "quit works!!"', '+Man!', '+call nvim_input("q")'} + matches('quit works!!', funcs.system(args, {'manpage contents'})) + end) end) diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua index 3b905f1f56..6e06304acd 100644 --- a/test/functional/terminal/cursor_spec.lua +++ b/test/functional/terminal/cursor_spec.lua @@ -5,6 +5,7 @@ local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim local nvim_dir, command = helpers.nvim_dir, helpers.command local nvim_prog = helpers.nvim_prog local eq, eval = helpers.eq, helpers.eval +local matches = helpers.matches local feed_command = helpers.feed_command local hide_cursor = thelpers.hide_cursor local show_cursor = thelpers.show_cursor @@ -177,7 +178,6 @@ describe('cursor with customized highlighting', function() end) describe('buffer cursor position is correct in terminal without number column', function() - if helpers.pending_win32(pending) then return end local screen local function setup_ex_register(str) @@ -525,10 +525,36 @@ describe('buffer cursor position is correct in terminal without number column', eq({6, 1}, eval('nvim_win_get_cursor(0)')) end) end) + + it('at the end of a line with trailing spaces #16234', function() + setup_ex_register('aaaaaaaa ') + feed('<C-R>r') + screen:expect([[ + | + | + | + | + Entering Ex mode. Type "visual" to go to Normal mode. | + :aaaaaaaa {1: } | + {3:-- TERMINAL --} | + ]]) + matches('^:aaaaaaaa [ ]*$', eval('nvim_get_current_line()')) + eq({6, 13}, eval('nvim_win_get_cursor(0)')) + feed([[<C-\><C-N>]]) + screen:expect([[ + | + | + | + | + Entering Ex mode. Type "visual" to go to Normal mode. | + :aaaaaaaa ^ {2: } | + | + ]]) + eq({6, 12}, eval('nvim_win_get_cursor(0)')) + end) end) describe('buffer cursor position is correct in terminal with number column', function() - if helpers.pending_win32(pending) then return end local screen local function setup_ex_register(str) @@ -879,4 +905,31 @@ describe('buffer cursor position is correct in terminal with number column', fun eq({6, 1}, eval('nvim_win_get_cursor(0)')) end) end) + + it('at the end of a line with trailing spaces #16234', function() + setup_ex_register('aaaaaaaa ') + feed('<C-R>r') + screen:expect([[ + {7: 1 } | + {7: 2 } | + {7: 3 } | + {7: 4 } | + {7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. | + {7: 6 }:aaaaaaaa {1: } | + {3:-- TERMINAL --} | + ]]) + matches('^:aaaaaaaa [ ]*$', eval('nvim_get_current_line()')) + eq({6, 13}, eval('nvim_win_get_cursor(0)')) + feed([[<C-\><C-N>]]) + screen:expect([[ + {7: 1 } | + {7: 2 } | + {7: 3 } | + {7: 4 } | + {7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. | + {7: 6 }:aaaaaaaa ^ {2: } | + | + ]]) + eq({6, 12}, eval('nvim_win_get_cursor(0)')) + end) end) diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua index 32c911a5e8..2a63971d48 100644 --- a/test/functional/terminal/highlight_spec.lua +++ b/test/functional/terminal/highlight_spec.lua @@ -117,7 +117,6 @@ describe(':terminal highlight', function() end) it(':terminal highlight has lower precedence than editor #9964', function() - if helpers.pending_win32(pending) then return end clear() local screen = Screen.new(30, 4) screen:set_default_attr_ids({ diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index d1cfc7e91b..34fcb6cab9 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -6,6 +6,7 @@ local feed, nvim_dir, feed_command = helpers.feed, helpers.nvim_dir, helpers.fee local iswin = helpers.iswin local eval = helpers.eval local command = helpers.command +local matches = helpers.matches local poke_eventloop = helpers.poke_eventloop local retry = helpers.retry local curbufmeths = helpers.curbufmeths @@ -460,8 +461,8 @@ describe("'scrollback' option", function() expect_lines(58) -- Verify off-screen state - eq((iswin() and '36: line' or '35: line'), eval("getline(line('w0') - 1)")) - eq((iswin() and '27: line' or '26: line'), eval("getline(line('w0') - 10)")) + matches((iswin() and '^36: line[ ]*$' or '^35: line[ ]*$'), eval("getline(line('w0') - 1)")) + matches((iswin() and '^27: line[ ]*$' or '^26: line[ ]*$'), eval("getline(line('w0') - 10)")) end) it('defaults to 10000 in :terminal buffers', function() diff --git a/test/functional/ui/cursor_spec.lua b/test/functional/ui/cursor_spec.lua index 92300a8fa2..d61eebe3ea 100644 --- a/test/functional/ui/cursor_spec.lua +++ b/test/functional/ui/cursor_spec.lua @@ -212,10 +212,10 @@ describe('ui/cursor', function() if m.blinkwait then m.blinkwait = 700 end end if m.hl_id then - m.hl_id = 62 + m.hl_id = 64 m.attr = {background = Screen.colors.DarkGray} end - if m.id_lm then m.id_lm = 63 end + if m.id_lm then m.id_lm = 65 end end -- Assert the new expectation. diff --git a/test/functional/ui/diff_spec.lua b/test/functional/ui/diff_spec.lua index 6f67dea2be..5d056cd6c3 100644 --- a/test/functional/ui/diff_spec.lua +++ b/test/functional/ui/diff_spec.lua @@ -57,40 +57,40 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }{2:------------------}{3:│}{1: }{4:0 }| - {1: }^1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}{3:│}{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }{2:------------------}│{1: }{4:0 }| + {1: }^1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }{2:------------------}{3:│}{1: }{4:0 }| - {1: }^1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}{3:│}{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }{2:------------------}│{1: }{4:0 }| + {1: }^1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -103,40 +103,40 @@ describe('Diff mode screen', function() feed(":set diffopt=filler<cr>") screen:expect([[ - {1: }{4:^0 }{3:│}{1: }{2:-----------------}| - {1: }1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}{3:│}{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }{4:^0 }│{1: }{2:-----------------}| + {1: }1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(":set diffopt+=internal<cr>") screen:expect([[ - {1: }{4:^0 }{3:│}{1: }{2:-----------------}| - {1: }1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}{3:│}{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }{4:^0 }│{1: }{2:-----------------}| + {1: }1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -149,53 +149,53 @@ describe('Diff mode screen', function() feed(":set diffopt=filler<cr>") screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}{3:│}{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{2:------------------}{3:│}{1: }{4:11 }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{2:------------------}│{1: }{4:11 }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(":set diffopt+=internal<cr>") screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}{3:│}{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{2:------------------}{3:│}{1: }{4:11 }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{2:------------------}│{1: }{4:11 }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) screen:try_resize(40, 9) screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}{3:│}{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | + {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) @@ -208,53 +208,53 @@ describe('Diff mode screen', function() feed(":set diffopt=filler<cr>") screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}{3:│}{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{4:11 }{3:│}{1: }{2:-----------------}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{4:11 }│{1: }{2:-----------------}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(":set diffopt+=internal<cr>") screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}{3:│}{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{4:11 }{3:│}{1: }{2:-----------------}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{4:11 }│{1: }{2:-----------------}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) screen:try_resize(40, 9) screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}{3:│}{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | + {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) @@ -267,40 +267,40 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }^1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }{2:------------------}{3:│}{1: }{4:4 }| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{4:11 }{3:│}{1: }{2:-----------------}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }{2:------------------}│{1: }{4:4 }| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{4:11 }│{1: }{2:-----------------}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }^1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }{2:------------------}{3:│}{1: }{4:4 }| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{4:11 }{3:│}{1: }{2:-----------------}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }{2:------------------}│{1: }{4:4 }| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{4:11 }│{1: }{2:-----------------}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -313,40 +313,40 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }^1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }{4:4 }{3:│}{1: }{2:-----------------}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{2:------------------}{3:│}{1: }{4:11 }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }{4:4 }│{1: }{2:-----------------}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{2:------------------}│{1: }{4:11 }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }^1 {3:│}{1: }1 | - {1: }2 {3:│}{1: }2 | - {1: }3 {3:│}{1: }3 | - {1: }4 {3:│}{1: }4 | - {1: }{4:4 }{3:│}{1: }{2:-----------------}| - {1: }5 {3:│}{1: }5 | - {1: }6 {3:│}{1: }6 | - {1: }7 {3:│}{1: }7 | - {1: }8 {3:│}{1: }8 | - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }{2:------------------}{3:│}{1: }{4:11 }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^1 │{1: }1 | + {1: }2 │{1: }2 | + {1: }3 │{1: }3 | + {1: }4 │{1: }4 | + {1: }{4:4 }│{1: }{2:-----------------}| + {1: }5 │{1: }5 | + {1: }6 │{1: }6 | + {1: }7 │{1: }7 | + {1: }8 │{1: }8 | + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }{2:------------------}│{1: }{4:11 }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -413,40 +413,40 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler<cr>') screen:expect([[ - {1: }^#include <stdio.h>{3:│}{1: }#include <stdio.h| - {1: } {3:│}{1: } | - {1: }{8:// Frobs foo heart}{3:│}{1: }{8:int fib(int n)}{9: }| - {1: }{4:int frobnitz(int f}{3:│}{1: }{2:-----------------}| - {1: }{ {3:│}{1: }{ | - {1: }{9: i}{8:nt i;}{9: }{3:│}{1: }{9: i}{8:f(n > 2)}{9: }| - {1: }{4: for(i = 0; i <}{3:│}{1: }{2:-----------------}| - {1: } { {3:│}{1: } { | - {1: }{9: }{8:printf("Yo}{3:│}{1: }{9: }{8:return fi}| - {1: }{4: printf("%d}{3:│}{1: }{2:-----------------}| - {1: } } {3:│}{1: } } | - {1: }{2:------------------}{3:│}{1: }{4: return 1; }| - {1: }} {3:│}{1: }} | - {1: } {3:│}{1: } | + {1: }^#include <stdio.h>│{1: }#include <stdio.h| + {1: } │{1: } | + {1: }{8:// Frobs foo heart}│{1: }{8:int fib(int n)}{9: }| + {1: }{4:int frobnitz(int f}│{1: }{2:-----------------}| + {1: }{ │{1: }{ | + {1: }{9: i}{8:nt i;}{9: }│{1: }{9: i}{8:f(n > 2)}{9: }| + {1: }{4: for(i = 0; i <}│{1: }{2:-----------------}| + {1: } { │{1: } { | + {1: }{9: }{8:printf("Yo}│{1: }{9: }{8:return fi}| + {1: }{4: printf("%d}│{1: }{2:-----------------}| + {1: } } │{1: } } | + {1: }{2:------------------}│{1: }{4: return 1; }| + {1: }} │{1: }} | + {1: } │{1: } | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) feed('G') screen:expect([[ - {1: }{2:------------------}{3:│}{1: }{4:int frobnitz(int }| - {1: }{ {3:│}{1: }{ | - {1: }{9: i}{8:f(n > 1)}{9: }{3:│}{1: }{9: i}{8:nt i;}{9: }| - {1: }{2:------------------}{3:│}{1: }{4: for(i = 0; i }| - {1: } { {3:│}{1: } { | - {1: }{9: }{8:return fac}{3:│}{1: }{9: }{8:printf("%}| - {1: } } {3:│}{1: } } | - {1: }{4: return 1; }{3:│}{1: }{2:-----------------}| - {1: }} {3:│}{1: }} | - {1: } {3:│}{1: } | - {1: }int main(int argc,{3:│}{1: }int main(int argc| - {1: }{ {3:│}{1: }{ | - {1: }{9: frobnitz(f}{8:act}{9:(}{3:│}{1: }{9: frobnitz(f}{8:ib}{9:(}| - {1: }^} {3:│}{1: }} | + {1: }{2:------------------}│{1: }{4:int frobnitz(int }| + {1: }{ │{1: }{ | + {1: }{9: i}{8:f(n > 1)}{9: }│{1: }{9: i}{8:nt i;}{9: }| + {1: }{2:------------------}│{1: }{4: for(i = 0; i }| + {1: } { │{1: } { | + {1: }{9: }{8:return fac}│{1: }{9: }{8:printf("%}| + {1: } } │{1: } } | + {1: }{4: return 1; }│{1: }{2:-----------------}| + {1: }} │{1: }} | + {1: } │{1: } | + {1: }int main(int argc,│{1: }int main(int argc| + {1: }{ │{1: }{ | + {1: }{9: frobnitz(f}{8:act}{9:(}│{1: }{9: frobnitz(f}{8:ib}{9:(}| + {1: }^} │{1: }} | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) @@ -456,40 +456,40 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,algorithm:patience<cr>') screen:expect([[ - {1: }^#include <stdio.h>{3:│}{1: }#include <stdio.h| - {1: } {3:│}{1: } | - {1: }{2:------------------}{3:│}{1: }{4:int fib(int n) }| - {1: }{2:------------------}{3:│}{1: }{4:{ }| - {1: }{2:------------------}{3:│}{1: }{4: if(n > 2) }| - {1: }{2:------------------}{3:│}{1: }{4: { }| - {1: }{2:------------------}{3:│}{1: }{4: return fi}| - {1: }{2:------------------}{3:│}{1: }{4: } }| - {1: }{2:------------------}{3:│}{1: }{4: return 1; }| - {1: }{2:------------------}{3:│}{1: }{4:} }| - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: }// Frobs foo heart{3:│}{1: }// Frobs foo hear| - {1: }int frobnitz(int f{3:│}{1: }int frobnitz(int | - {1: }{ {3:│}{1: }{ | + {1: }^#include <stdio.h>│{1: }#include <stdio.h| + {1: } │{1: } | + {1: }{2:------------------}│{1: }{4:int fib(int n) }| + {1: }{2:------------------}│{1: }{4:{ }| + {1: }{2:------------------}│{1: }{4: if(n > 2) }| + {1: }{2:------------------}│{1: }{4: { }| + {1: }{2:------------------}│{1: }{4: return fi}| + {1: }{2:------------------}│{1: }{4: } }| + {1: }{2:------------------}│{1: }{4: return 1; }| + {1: }{2:------------------}│{1: }{4:} }| + {1: }{2:------------------}│{1: }{4: }| + {1: }// Frobs foo heart│{1: }// Frobs foo hear| + {1: }int frobnitz(int f│{1: }int frobnitz(int | + {1: }{ │{1: }{ | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) feed('G') screen:expect([[ - {1: } {3:│}{1: } | - {1: }{4:int fact(int n) }{3:│}{1: }{2:-----------------}| - {1: }{4:{ }{3:│}{1: }{2:-----------------}| - {1: }{4: if(n > 1) }{3:│}{1: }{2:-----------------}| - {1: }{4: { }{3:│}{1: }{2:-----------------}| - {1: }{4: return fac}{3:│}{1: }{2:-----------------}| - {1: }{4: } }{3:│}{1: }{2:-----------------}| - {1: }{4: return 1; }{3:│}{1: }{2:-----------------}| - {1: }{4:} }{3:│}{1: }{2:-----------------}| - {1: }{4: }{3:│}{1: }{2:-----------------}| - {1: }int main(int argc,{3:│}{1: }int main(int argc| - {1: }{ {3:│}{1: }{ | - {1: }{9: frobnitz(f}{8:act}{9:(}{3:│}{1: }{9: frobnitz(f}{8:ib}{9:(}| - {1: }^} {3:│}{1: }} | + {1: } │{1: } | + {1: }{4:int fact(int n) }│{1: }{2:-----------------}| + {1: }{4:{ }│{1: }{2:-----------------}| + {1: }{4: if(n > 1) }│{1: }{2:-----------------}| + {1: }{4: { }│{1: }{2:-----------------}| + {1: }{4: return fac}│{1: }{2:-----------------}| + {1: }{4: } }│{1: }{2:-----------------}| + {1: }{4: return 1; }│{1: }{2:-----------------}| + {1: }{4:} }│{1: }{2:-----------------}| + {1: }{4: }│{1: }{2:-----------------}| + {1: }int main(int argc,│{1: }int main(int argc| + {1: }{ │{1: }{ | + {1: }{9: frobnitz(f}{8:act}{9:(}│{1: }{9: frobnitz(f}{8:ib}{9:(}| + {1: }^} │{1: }} | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) @@ -499,40 +499,40 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,algorithm:histogram<cr>') screen:expect([[ - {1: }^#include <stdio.h>{3:│}{1: }#include <stdio.h| - {1: } {3:│}{1: } | - {1: }{2:------------------}{3:│}{1: }{4:int fib(int n) }| - {1: }{2:------------------}{3:│}{1: }{4:{ }| - {1: }{2:------------------}{3:│}{1: }{4: if(n > 2) }| - {1: }{2:------------------}{3:│}{1: }{4: { }| - {1: }{2:------------------}{3:│}{1: }{4: return fi}| - {1: }{2:------------------}{3:│}{1: }{4: } }| - {1: }{2:------------------}{3:│}{1: }{4: return 1; }| - {1: }{2:------------------}{3:│}{1: }{4:} }| - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: }// Frobs foo heart{3:│}{1: }// Frobs foo hear| - {1: }int frobnitz(int f{3:│}{1: }int frobnitz(int | - {1: }{ {3:│}{1: }{ | + {1: }^#include <stdio.h>│{1: }#include <stdio.h| + {1: } │{1: } | + {1: }{2:------------------}│{1: }{4:int fib(int n) }| + {1: }{2:------------------}│{1: }{4:{ }| + {1: }{2:------------------}│{1: }{4: if(n > 2) }| + {1: }{2:------------------}│{1: }{4: { }| + {1: }{2:------------------}│{1: }{4: return fi}| + {1: }{2:------------------}│{1: }{4: } }| + {1: }{2:------------------}│{1: }{4: return 1; }| + {1: }{2:------------------}│{1: }{4:} }| + {1: }{2:------------------}│{1: }{4: }| + {1: }// Frobs foo heart│{1: }// Frobs foo hear| + {1: }int frobnitz(int f│{1: }int frobnitz(int | + {1: }{ │{1: }{ | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) feed('G') screen:expect([[ - {1: } {3:│}{1: } | - {1: }{4:int fact(int n) }{3:│}{1: }{2:-----------------}| - {1: }{4:{ }{3:│}{1: }{2:-----------------}| - {1: }{4: if(n > 1) }{3:│}{1: }{2:-----------------}| - {1: }{4: { }{3:│}{1: }{2:-----------------}| - {1: }{4: return fac}{3:│}{1: }{2:-----------------}| - {1: }{4: } }{3:│}{1: }{2:-----------------}| - {1: }{4: return 1; }{3:│}{1: }{2:-----------------}| - {1: }{4:} }{3:│}{1: }{2:-----------------}| - {1: }{4: }{3:│}{1: }{2:-----------------}| - {1: }int main(int argc,{3:│}{1: }int main(int argc| - {1: }{ {3:│}{1: }{ | - {1: }{9: frobnitz(f}{8:act}{9:(}{3:│}{1: }{9: frobnitz(f}{8:ib}{9:(}| - {1: }^} {3:│}{1: }} | + {1: } │{1: } | + {1: }{4:int fact(int n) }│{1: }{2:-----------------}| + {1: }{4:{ }│{1: }{2:-----------------}| + {1: }{4: if(n > 1) }│{1: }{2:-----------------}| + {1: }{4: { }│{1: }{2:-----------------}| + {1: }{4: return fac}│{1: }{2:-----------------}| + {1: }{4: } }│{1: }{2:-----------------}| + {1: }{4: return 1; }│{1: }{2:-----------------}| + {1: }{4:} }│{1: }{2:-----------------}| + {1: }{4: }│{1: }{2:-----------------}| + {1: }int main(int argc,│{1: }int main(int argc| + {1: }{ │{1: }{ | + {1: }{9: frobnitz(f}{8:act}{9:(}│{1: }{9: frobnitz(f}{8:ib}{9:(}| + {1: }^} │{1: }} | {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) @@ -566,20 +566,20 @@ int main(int argc, char **argv) reread() feed(":set diffopt=internal,filler<cr>") screen:expect([[ - {1: }^def finalize(value{3:│}{1: }def finalize(valu| - {1: } {3:│}{1: } | - {1: } values.each do |{3:│}{1: } values.each do | - {1: }{2:------------------}{3:│}{1: }{4: v.prepare }| - {1: }{2:------------------}{3:│}{1: }{4: end }| - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: }{2:------------------}{3:│}{1: }{4: values.each do }| - {1: } v.finalize {3:│}{1: } v.finalize | - {1: } end {3:│}{1: } end | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^def finalize(value│{1: }def finalize(valu| + {1: } │{1: } | + {1: } values.each do |│{1: } values.each do | + {1: }{2:------------------}│{1: }{4: v.prepare }| + {1: }{2:------------------}│{1: }{4: end }| + {1: }{2:------------------}│{1: }{4: }| + {1: }{2:------------------}│{1: }{4: values.each do }| + {1: } v.finalize │{1: } v.finalize | + {1: } end │{1: } end | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) @@ -589,20 +589,20 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,indent-heuristic<cr>') screen:expect([[ - {1: }^def finalize(value{3:│}{1: }def finalize(valu| - {1: } {3:│}{1: } | - {1: }{2:------------------}{3:│}{1: }{4: values.each do }| - {1: }{2:------------------}{3:│}{1: }{4: v.prepare }| - {1: }{2:------------------}{3:│}{1: }{4: end }| - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: } values.each do |{3:│}{1: } values.each do | - {1: } v.finalize {3:│}{1: } v.finalize | - {1: } end {3:│}{1: } end | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^def finalize(value│{1: }def finalize(valu| + {1: } │{1: } | + {1: }{2:------------------}│{1: }{4: values.each do }| + {1: }{2:------------------}│{1: }{4: v.prepare }| + {1: }{2:------------------}│{1: }{4: end }| + {1: }{2:------------------}│{1: }{4: }| + {1: } values.each do |│{1: } values.each do | + {1: } v.finalize │{1: } v.finalize | + {1: } end │{1: } end | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| | ]]) @@ -613,20 +613,20 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,indent-heuristic,algorithm:patience<cr>') feed(':<cr>') screen:expect([[ - {1: }^def finalize(value{3:│}{1: }def finalize(valu| - {1: } {3:│}{1: } | - {1: }{2:------------------}{3:│}{1: }{4: values.each do }| - {1: }{2:------------------}{3:│}{1: }{4: v.prepare }| - {1: }{2:------------------}{3:│}{1: }{4: end }| - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: } values.each do |{3:│}{1: } values.each do | - {1: } v.finalize {3:│}{1: } v.finalize | - {1: } end {3:│}{1: } end | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^def finalize(value│{1: }def finalize(valu| + {1: } │{1: } | + {1: }{2:------------------}│{1: }{4: values.each do }| + {1: }{2:------------------}│{1: }{4: v.prepare }| + {1: }{2:------------------}│{1: }{4: end }| + {1: }{2:------------------}│{1: }{4: }| + {1: } values.each do |│{1: } values.each do | + {1: } v.finalize │{1: } v.finalize | + {1: } end │{1: } end | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| : | ]]) @@ -640,40 +640,40 @@ int main(int argc, char **argv) feed(':set diffopt=filler<cr>') screen:expect([[ - {1:+ }{5:^+-- 10 lines: 1···}{3:│}{1:+ }{5:+-- 10 lines: 1··}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:+ }{5:^+-- 10 lines: 1···}{3:│}{1:+ }{5:+-- 10 lines: 1··}| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -686,40 +686,40 @@ int main(int argc, char **argv) feed(':set diffopt=filler<cr>') screen:expect([[ - {1:- }^ {3:│}{1:- } | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:- }^ │{1:- } | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:- }^ {3:│}{1:- } | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1:- }^ │{1:- } | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -732,40 +732,40 @@ int main(int argc, char **argv) feed(':set diffopt=filler,icase<cr>') screen:expect([[ - {1: }^a {3:│}{1: }A | - {1: }b {3:│}{1: }b | - {1: }{9:cd }{3:│}{1: }{9:cD}{8:e}{9: }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }A | + {1: }b │{1: }b | + {1: }{9:cd }│{1: }{9:cD}{8:e}{9: }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler,icase | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }^a {3:│}{1: }A | - {1: }b {3:│}{1: }b | - {1: }{9:cd }{3:│}{1: }{9:cD}{8:e}{9: }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }A | + {1: }b │{1: }b | + {1: }{9:cd }│{1: }{9:cD}{8:e}{9: }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) @@ -784,20 +784,20 @@ int main(int argc, char **argv) reread() feed(':set diffopt=filler,iwhite<cr>') screen:expect([[ - {1: }^int main() {3:│}{1: }int main() | - {1: }{ {3:│}{1: }{ | - {1: }{2:------------------}{3:│}{1: }{4: if (0) }| - {1: }{2:------------------}{3:│}{1: }{4: { }| - {1: } printf("Hello, {3:│}{1: } printf("Hel| - {1: } return 0; {3:│}{1: } return 0; | - {1: }{2:------------------}{3:│}{1: }{4: } }| - {1: }} {3:│}{1: }} | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^int main() │{1: }int main() | + {1: }{ │{1: }{ | + {1: }{2:------------------}│{1: }{4: if (0) }| + {1: }{2:------------------}│{1: }{4: { }| + {1: } printf("Hello, │{1: } printf("Hel| + {1: } return 0; │{1: } return 0; | + {1: }{2:------------------}│{1: }{4: } }| + {1: }} │{1: }} | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler,iwhite | ]]) @@ -807,20 +807,20 @@ int main(int argc, char **argv) reread() feed(':set diffopt=filler,iwhite,internal<cr>') screen:expect([[ - {1: }^int main() {3:│}{1: }int main() | - {1: }{ {3:│}{1: }{ | - {1: }{2:------------------}{3:│}{1: }{4: if (0) }| - {1: }{2:------------------}{3:│}{1: }{4: { }| - {1: } printf("Hello, {3:│}{1: } printf("Hel| - {1: } return 0; {3:│}{1: } return 0; | - {1: }{2:------------------}{3:│}{1: }{4: } }| - {1: }} {3:│}{1: }} | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^int main() │{1: }int main() | + {1: }{ │{1: }{ | + {1: }{2:------------------}│{1: }{4: if (0) }| + {1: }{2:------------------}│{1: }{4: { }| + {1: } printf("Hello, │{1: } printf("Hel| + {1: } return 0; │{1: } return 0; | + {1: }{2:------------------}│{1: }{4: } }| + {1: }} │{1: }} | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=filler,iwhite,internal | ]]) @@ -838,20 +838,20 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,iblank<cr>') screen:expect([[ - {1: }^a {3:│}{1: }a | - {1: }{4: }{3:│}{1: }{2:-----------------}| - {1: }{4: }{3:│}{1: }{2:-----------------}| - {1: }cd {3:│}{1: }cd | - {1: }ef {3:│}{1: } | - {1: }{8:xxx}{9: }{3:│}{1: }ef | - {6:~ }{3:│}{1: }{8:yyy}{9: }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }a | + {1: }{4: }│{1: }{2:-----------------}| + {1: }{4: }│{1: }{2:-----------------}| + {1: }cd │{1: }cd | + {1: }ef │{1: } | + {1: }{8:xxx}{9: }│{1: }ef | + {6:~ }│{1: }{8:yyy}{9: }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| :set diffopt=internal,filler,iblank | ]]) @@ -862,20 +862,20 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iblank,iwhite<cr>') feed(':<cr>') screen:expect([[ - {1: }^a {3:│}{1: }a | - {1: } {3:│}{1: }cd | - {1: } {3:│}{1: } | - {1: }cd {3:│}{1: }ef | - {1: }ef {3:│}{1: }{8:yyy}{9: }| - {1: }{8:xxx}{9: }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }a | + {1: } │{1: }cd | + {1: } │{1: } | + {1: }cd │{1: }ef | + {1: }ef │{1: }{8:yyy}{9: }| + {1: }{8:xxx}{9: }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| : | ]]) @@ -886,20 +886,20 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iblank,iwhiteall<cr>') feed(':<cr>') screen:expect([[ - {1: }^a {3:│}{1: }a | - {1: } {3:│}{1: }cd | - {1: } {3:│}{1: } | - {1: }cd {3:│}{1: }ef | - {1: }ef {3:│}{1: }{8:yyy}{9: }| - {1: }{8:xxx}{9: }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }a | + {1: } │{1: }cd | + {1: } │{1: } | + {1: }cd │{1: }ef | + {1: }ef │{1: }{8:yyy}{9: }| + {1: }{8:xxx}{9: }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| : | ]]) @@ -910,20 +910,20 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iblank,iwhiteeol<cr>') feed(':<cr>') screen:expect([[ - {1: }^a {3:│}{1: }a | - {1: } {3:│}{1: }cd | - {1: } {3:│}{1: } | - {1: }cd {3:│}{1: }ef | - {1: }ef {3:│}{1: }{8:yyy}{9: }| - {1: }{8:xxx}{9: }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }a | + {1: } │{1: }cd | + {1: } │{1: } | + {1: }cd │{1: }ef | + {1: }ef │{1: }{8:yyy}{9: }| + {1: }{8:xxx}{9: }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| : | ]]) @@ -942,20 +942,20 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iwhiteeol<cr>') feed(':<cr>') screen:expect([[ - {1: }^a {3:│}{1: }a | - {1: }x {3:│}{1: }x | - {1: }{9:cd }{3:│}{1: }{9:c}{8: }{9:d }| - {1: }{9:ef }{3:│}{1: }{8: }{9:ef }| - {1: }{9:xx }{8: }{9:xx }{3:│}{1: }{9:xx xx }| - {1: }foo {3:│}{1: }foo | - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: }bar {3:│}{1: }bar | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }a | + {1: }x │{1: }x | + {1: }{9:cd }│{1: }{9:c}{8: }{9:d }| + {1: }{9:ef }│{1: }{8: }{9:ef }| + {1: }{9:xx }{8: }{9:xx }│{1: }{9:xx xx }| + {1: }foo │{1: }foo | + {1: }{2:------------------}│{1: }{4: }| + {1: }bar │{1: }bar | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| : | ]]) @@ -966,20 +966,20 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iwhiteall<cr>') feed(':<cr>') screen:expect([[ - {1: }^a {3:│}{1: }a | - {1: }x {3:│}{1: }x | - {1: }cd {3:│}{1: }c d | - {1: }ef {3:│}{1: } ef | - {1: }xx xx {3:│}{1: }xx xx | - {1: }foo {3:│}{1: }foo | - {1: }{2:------------------}{3:│}{1: }{4: }| - {1: }bar {3:│}{1: }bar | - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| - {6:~ }{3:│}{6:~ }| + {1: }^a │{1: }a | + {1: }x │{1: }x | + {1: }cd │{1: }c d | + {1: }ef │{1: } ef | + {1: }xx xx │{1: }xx xx | + {1: }foo │{1: }foo | + {1: }{2:------------------}│{1: }{4: }| + {1: }bar │{1: }bar | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| : | ]]) @@ -1029,14 +1029,14 @@ it('win_update redraws lines properly', function() command("windo diffthis") command("windo 1") screen:expect{grid=[[ - {13: }{16:-----------------------}{14:│}{13: }{15:^1 }| - {13: }{16:-----------------------}{14:│}{13: }{15: }| - {13: }{16:-----------------------}{14:│}{13: }{15: }| - {13: }2 {14:│}{13: }2 | - {13: }{17:2}{18:a }{14:│}{13: }{17:1}{18:a }| - {13: }{15:2b }{14:│}{13: }{16:----------------------}| - {13: } {14:│}{13: } | - {1:~ }{14:│}{1:~ }| + {13: }{16:-----------------------}│{13: }{15:^1 }| + {13: }{16:-----------------------}│{13: }{15: }| + {13: }{16:-----------------------}│{13: }{15: }| + {13: }2 │{13: }2 | + {13: }{17:2}{18:a }│{13: }{17:1}{18:a }| + {13: }{15:2b }│{13: }{16:----------------------}| + {13: } │{13: } | + {1:~ }│{1:~ }| {14:left [+] }{12:[No Name] [+] }| | ]]} @@ -1046,14 +1046,14 @@ it('win_update redraws lines properly', function() feed('<C-y>') feed('<C-y>') screen:expect{grid=[[ - {13: }{16:-----------------------}{14:│}{13: }{15:1 }| - {13: }{16:-----------------------}{14:│}{13: }{15: }| - {13: }{16:-----------------------}{14:│}{13: }{15:^ }| - {13: }2 {14:│}{13: }2 | - {13: }{17:2}{18:a }{14:│}{13: }{17:1}{18:a }| - {13: }{15:2b }{14:│}{13: }{16:----------------------}| - {13: } {14:│}{13: } | - {1:~ }{14:│}{1:~ }| + {13: }{16:-----------------------}│{13: }{15:1 }| + {13: }{16:-----------------------}│{13: }{15: }| + {13: }{16:-----------------------}│{13: }{15:^ }| + {13: }2 │{13: }2 | + {13: }{17:2}{18:a }│{13: }{17:1}{18:a }| + {13: }{15:2b }│{13: }{16:----------------------}| + {13: } │{13: } | + {1:~ }│{1:~ }| {14:left [+] }{12:[No Name] [+] }| | ]]} @@ -1084,52 +1084,52 @@ it('diff updates line numbers below filler lines', function() setlocal number rnu cursorline cursorlineopt=number foldcolumn=0 ]]) screen:expect([[ - {1: }a {3:│}{10:1 }^a | - {1: }a {3:│}{11: 1 }a | - {1: }a {3:│}{11: 2 }a | - {1: }{8:x}{9: }{3:│}{11: 3 }{8:y}{9: }| - {1: }{4:x }{3:│}{11: }{2:----------------}| - {1: }{4:x }{3:│}{11: }{2:----------------}| - {1: }b {3:│}{11: 4 }b | - {1: }b {3:│}{11: 5 }b | - {1: }b {3:│}{11: 6 }b | - {1: }b {3:│}{11: 7 }b | - {1: }b {3:│}{11: 8 }b | - {6:~ }{3:│}{6:~ }| + {1: }a │{10:1 }^a | + {1: }a │{11: 1 }a | + {1: }a │{11: 2 }a | + {1: }{8:x}{9: }│{11: 3 }{8:y}{9: }| + {1: }{4:x }│{11: }{2:----------------}| + {1: }{4:x }│{11: }{2:----------------}| + {1: }b │{11: 4 }b | + {1: }b │{11: 5 }b | + {1: }b │{11: 6 }b | + {1: }b │{11: 7 }b | + {1: }b │{11: 8 }b | + {6:~ }│{6:~ }| {3:[No Name] [+] }{7:[No Name] [+] }| | ]]) feed('j') screen:expect([[ - {1: }a {3:│}{11: 1 }a | - {1: }a {3:│}{10:2 }^a | - {1: }a {3:│}{11: 1 }a | - {1: }{8:x}{9: }{3:│}{11: 2 }{8:y}{9: }| - {1: }{4:x }{3:│}{11: }{2:----------------}| - {1: }{4:x }{3:│}{11: }{2:----------------}| - {1: }b {3:│}{11: 3 }b | - {1: }b {3:│}{11: 4 }b | - {1: }b {3:│}{11: 5 }b | - {1: }b {3:│}{11: 6 }b | - {1: }b {3:│}{11: 7 }b | - {6:~ }{3:│}{6:~ }| + {1: }a │{11: 1 }a | + {1: }a │{10:2 }^a | + {1: }a │{11: 1 }a | + {1: }{8:x}{9: }│{11: 2 }{8:y}{9: }| + {1: }{4:x }│{11: }{2:----------------}| + {1: }{4:x }│{11: }{2:----------------}| + {1: }b │{11: 3 }b | + {1: }b │{11: 4 }b | + {1: }b │{11: 5 }b | + {1: }b │{11: 6 }b | + {1: }b │{11: 7 }b | + {6:~ }│{6:~ }| {3:[No Name] [+] }{7:[No Name] [+] }| | ]]) feed('j') screen:expect([[ - {1: }a {3:│}{11: 2 }a | - {1: }a {3:│}{11: 1 }a | - {1: }a {3:│}{10:3 }^a | - {1: }{8:x}{9: }{3:│}{11: 1 }{8:y}{9: }| - {1: }{4:x }{3:│}{11: }{2:----------------}| - {1: }{4:x }{3:│}{11: }{2:----------------}| - {1: }b {3:│}{11: 2 }b | - {1: }b {3:│}{11: 3 }b | - {1: }b {3:│}{11: 4 }b | - {1: }b {3:│}{11: 5 }b | - {1: }b {3:│}{11: 6 }b | - {6:~ }{3:│}{6:~ }| + {1: }a │{11: 2 }a | + {1: }a │{11: 1 }a | + {1: }a │{10:3 }^a | + {1: }{8:x}{9: }│{11: 1 }{8:y}{9: }| + {1: }{4:x }│{11: }{2:----------------}| + {1: }{4:x }│{11: }{2:----------------}| + {1: }b │{11: 2 }b | + {1: }b │{11: 3 }b | + {1: }b │{11: 4 }b | + {1: }b │{11: 5 }b | + {1: }b │{11: 6 }b | + {6:~ }│{6:~ }| {3:[No Name] [+] }{7:[No Name] [+] }| | ]]) @@ -1158,70 +1158,70 @@ it('Align the filler lines when changing text in diff mode', function() exe "normal Gl5\<C-E>" ]]) screen:expect{grid=[[ - {1: }{2:------------------}{3:│}{1: }{4:6 }| - {1: }{2:------------------}{3:│}{1: }{4:7 }| - {1: }{2:------------------}{3:│}{1: }{4:8 }| - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }11 {3:│}{1: }11 | - {1: }12 {3:│}{1: }12 | - {1: }13 {3:│}{1: }13 | - {1: }14 {3:│}{1: }14 | - {1:- }1^5 {3:│}{1:- }15 | - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| + {1: }{2:------------------}│{1: }{4:6 }| + {1: }{2:------------------}│{1: }{4:7 }| + {1: }{2:------------------}│{1: }{4:8 }| + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }11 │{1: }11 | + {1: }12 │{1: }12 | + {1: }13 │{1: }13 | + {1: }14 │{1: }14 | + {1:- }1^5 │{1:- }15 | + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| {8:[No Name] [+] }{3:[No Name] [+] }| | ]]} feed('ax<Esc>') screen:expect{grid=[[ - {1: }{2:------------------}{3:│}{1: }{4:6 }| - {1: }{2:------------------}{3:│}{1: }{4:7 }| - {1: }{2:------------------}{3:│}{1: }{4:8 }| - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }11 {3:│}{1: }11 | - {1: }12 {3:│}{1: }12 | - {1: }13 {3:│}{1: }13 | - {1: }14 {3:│}{1: }14 | - {1: }{5:15}{6:^x}{5: }{3:│}{1: }{5:15 }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| + {1: }{2:------------------}│{1: }{4:6 }| + {1: }{2:------------------}│{1: }{4:7 }| + {1: }{2:------------------}│{1: }{4:8 }| + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }11 │{1: }11 | + {1: }12 │{1: }12 | + {1: }13 │{1: }13 | + {1: }14 │{1: }14 | + {1: }{5:15}{6:^x}{5: }│{1: }{5:15 }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| {8:[No Name] [+] }{3:[No Name] [+] }| | ]]} feed('<C-W>lay<Esc>') screen:expect{grid=[[ - {1: }{2:-----------------}{3:│}{1: }{4:6 }| - {1: }{2:-----------------}{3:│}{1: }{4:7 }| - {1: }{2:-----------------}{3:│}{1: }{4:8 }| - {1: }9 {3:│}{1: }9 | - {1: }10 {3:│}{1: }10 | - {1: }11 {3:│}{1: }11 | - {1: }12 {3:│}{1: }12 | - {1: }13 {3:│}{1: }13 | - {1: }14 {3:│}{1: }14 | - {1: }{5:15}{6:x}{5: }{3:│}{1: }{5:15}{6:^y}{5: }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| + {1: }{2:-----------------}│{1: }{4:6 }| + {1: }{2:-----------------}│{1: }{4:7 }| + {1: }{2:-----------------}│{1: }{4:8 }| + {1: }9 │{1: }9 | + {1: }10 │{1: }10 | + {1: }11 │{1: }11 | + {1: }12 │{1: }12 | + {1: }13 │{1: }13 | + {1: }14 │{1: }14 | + {1: }{5:15}{6:x}{5: }│{1: }{5:15}{6:^y}{5: }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| {3:[No Name] [+] }{8:[No Name] [+] }| | ]]} @@ -1253,24 +1253,24 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun -- Test using internal diff screen:expect([[ - {1: }{5:^A}{4: }{2:│}{1: }{5:a}{4: }| - {1: }b {2:│}{1: }b | - {1: }{4:c }{2:│}{1: }{4:c}{7:^@}{4: }| - {1: }d {2:│}{1: }d | - {1: }{5:E}{4: }{2:│}{1: }{5:e}{4: }| - {1: }f {2:│}{1: }f | - {1: }g {2:│}{1: }g | - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| + {1: }{5:^A}{4: }│{1: }{5:a}{4: }| + {1: }b │{1: }b | + {1: }{4:c }│{1: }{4:c}{7:^@}{4: }| + {1: }d │{1: }d | + {1: }{5:E}{4: }│{1: }{5:e}{4: }| + {1: }f │{1: }f | + {1: }g │{1: }g | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {8:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -1279,24 +1279,24 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun command('set diffopt+=icase') feed('<C-L>') screen:expect([[ - {1: }^A {2:│}{1: }a | - {1: }b {2:│}{1: }b | - {1: }{4:c }{2:│}{1: }{4:c}{7:^@}{4: }| - {1: }d {2:│}{1: }d | - {1: }E {2:│}{1: }e | - {1: }f {2:│}{1: }f | - {1: }g {2:│}{1: }g | - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| + {1: }^A │{1: }a | + {1: }b │{1: }b | + {1: }{4:c }│{1: }{4:c}{7:^@}{4: }| + {1: }d │{1: }d | + {1: }E │{1: }e | + {1: }f │{1: }f | + {1: }g │{1: }g | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {8:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -1305,24 +1305,24 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun command('set diffopt=filler') feed('<C-L>') screen:expect([[ - {1: }{5:^A}{4: }{2:│}{1: }{5:a}{4: }| - {1: }b {2:│}{1: }b | - {1: }{4:c }{2:│}{1: }{4:c}{7:^@}{4: }| - {1: }d {2:│}{1: }d | - {1: }{5:E}{4: }{2:│}{1: }{5:e}{4: }| - {1: }f {2:│}{1: }f | - {1: }g {2:│}{1: }g | - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| + {1: }{5:^A}{4: }│{1: }{5:a}{4: }| + {1: }b │{1: }b | + {1: }{4:c }│{1: }{4:c}{7:^@}{4: }| + {1: }d │{1: }d | + {1: }{5:E}{4: }│{1: }{5:e}{4: }| + {1: }f │{1: }f | + {1: }g │{1: }g | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {8:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -1331,24 +1331,24 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun command('set diffopt+=filler,icase') feed('<C-L>') screen:expect([[ - {1: }^A {2:│}{1: }a | - {1: }b {2:│}{1: }b | - {1: }{4:c }{2:│}{1: }{4:c}{7:^@}{4: }| - {1: }d {2:│}{1: }d | - {1: }E {2:│}{1: }e | - {1: }f {2:│}{1: }f | - {1: }g {2:│}{1: }g | - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| - {6:~ }{2:│}{6:~ }| + {1: }^A │{1: }a | + {1: }b │{1: }b | + {1: }{4:c }│{1: }{4:c}{7:^@}{4: }| + {1: }d │{1: }d | + {1: }E │{1: }e | + {1: }f │{1: }f | + {1: }g │{1: }g | + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| + {6:~ }│{6:~ }| {8:[No Name] [+] }{2:[No Name] [+] }| | ]]) diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 96e7b1b6bc..03170c79e6 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -22,6 +22,7 @@ local curbuf, curwin, curtab = helpers.curbuf, helpers.curwin, helpers.curtab describe('float window', function() before_each(function() clear() + command('hi VertSplit gui=reverse') end) local attrs = { [0] = {bold=true, foreground=Screen.colors.Blue}, @@ -7590,6 +7591,53 @@ describe('float window', function() ]]} end end) + + it('can use winbar', function() + local buf = meths.create_buf(false,false) + local win1 = meths.open_win(buf, false, {relative='editor', width=15, height=3, row=1, col=5}) + meths.win_set_option(win1, 'winbar', 'floaty bar') + + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [3:----------------------------------------]| + ## grid 2 + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + ## grid 3 + | + ## grid 4 + {3:floaty bar }| + {1: }| + {2:~ }| + ]], float_pos={ + [4] = {{id = 1001}, "NW", 1, 1, 5, true, 50}; + }, win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + }} + else + screen:expect{grid=[[ + ^ | + {0:~ }{3:floaty bar }{0: }| + {0:~ }{1: }{0: }| + {0:~ }{2:~ }{0: }| + {0:~ }| + {0:~ }| + | + ]]} + end + end) end describe('with ext_multigrid', function() diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index bc52696418..9762805dee 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -21,12 +21,14 @@ local content1 = [[ describe("folded lines", function() before_each(function() clear() + command('hi VertSplit gui=reverse') end) local function with_ext_multigrid(multigrid) local screen before_each(function() clear() + command('hi VertSplit gui=reverse') screen = Screen.new(45, 8) screen:attach({rgb=true, ext_multigrid=multigrid}) screen:set_default_attr_ids({ diff --git a/test/functional/ui/global_statusline_spec.lua b/test/functional/ui/global_statusline_spec.lua index f6821ec589..369c4a31f1 100644 --- a/test/functional/ui/global_statusline_spec.lua +++ b/test/functional/ui/global_statusline_spec.lua @@ -65,20 +65,20 @@ describe('global statusline', function() it('works with splits', function() command('vsplit | split | vsplit | vsplit | wincmd l | split | 2wincmd l | split') screen:expect{grid=[[ - {1:│} {1:│} {1:│}^ | - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:├────────────────┤}{2:~}{1:│}{2:~ }| - {2:~ }{1:│} {1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:├────────────────────}| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│} | - {1:────────────────────┴────────────────┴─┤}{2:~ }| - {1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| + │ │ │^ | + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }├────────────────┤{2:~}│{2:~ }| + {2:~ }│ │{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}├────────────────────| + {2:~ }│{2:~ }│{2:~}│ | + ────────────────────┴────────────────┴─┤{2:~ }| + │{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| {3:[No Name] 0,0-1 All}| | ]], attr_ids={ @@ -137,20 +137,20 @@ describe('global statusline', function() command('vsplit | split | vsplit | vsplit | wincmd l | split | 2wincmd l | split') command('set laststatus=2') screen:expect{grid=[[ - {1:│} {1:│} {1:│}^ | - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│< Name] 0,0-1 │}{2:~}{1:│}{2:~ }| - {2:~ }{1:│} {1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{3:<No Name] 0,0-1 All}| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│} | - {1:<No Name] 0,0-1 All < Name] 0,0-1 <│}{2:~ }| - {1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| + │ │ │^ | + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{1:< Name] 0,0-1 }│{2:~}│{2:~ }| + {2:~ }│ │{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{3:<No Name] 0,0-1 All}| + {2:~ }│{2:~ }│{2:~}│ | + {1:<No Name] 0,0-1 All < Name] 0,0-1 <}│{2:~ }| + │{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| {1:[No Name] 0,0-1 All <No Name] 0,0-1 All}| | ]], attr_ids={ @@ -161,20 +161,20 @@ describe('global statusline', function() command('set laststatus=3') screen:expect{grid=[[ - {1:│} {1:│} {1:│}^ | - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:├────────────────┤}{2:~}{1:│}{2:~ }| - {2:~ }{1:│} {1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:├────────────────────}| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│} | - {1:────────────────────┴────────────────┴─┤}{2:~ }| - {1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| + │ │ │^ | + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }├────────────────┤{2:~}│{2:~ }| + {2:~ }│ │{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}├────────────────────| + {2:~ }│{2:~ }│{2:~}│ | + ────────────────────┴────────────────┴─┤{2:~ }| + │{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| {3:[No Name] 0,0-1 All}| | ]], attr_ids={ @@ -185,21 +185,21 @@ describe('global statusline', function() command('set laststatus=0') screen:expect{grid=[[ - {1:│} {1:│} {1:│}^ | - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│< Name] 0,0-1 │}{2:~}{1:│}{2:~ }| - {2:~ }{1:│} {1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{3:<No Name] 0,0-1 All}| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│} | - {1:<No Name] 0,0-1 All < Name] 0,0-1 <│}{2:~ }| - {1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| + │ │ │^ | + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{1:< Name] 0,0-1 }│{2:~}│{2:~ }| + {2:~ }│ │{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{3:<No Name] 0,0-1 All}| + {2:~ }│{2:~ }│{2:~}│ | + {1:<No Name] 0,0-1 All < Name] 0,0-1 <}│{2:~ }| + │{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| 0,0-1 All | ]], attr_ids={ [1] = {reverse = true}; @@ -209,20 +209,20 @@ describe('global statusline', function() command('set laststatus=3') screen:expect{grid=[[ - {1:│} {1:│} {1:│}^ | - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:├────────────────┤}{2:~}{1:│}{2:~ }| - {2:~ }{1:│} {1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:├────────────────────}| - {2:~ }{1:│}{2:~ }{1:│}{2:~}{1:│} | - {1:────────────────────┴────────────────┴─┤}{2:~ }| - {1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| - {2:~ }{1:│}{2:~ }| + │ │ │^ | + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }├────────────────┤{2:~}│{2:~ }| + {2:~ }│ │{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}│{2:~ }| + {2:~ }│{2:~ }│{2:~}├────────────────────| + {2:~ }│{2:~ }│{2:~}│ | + ────────────────────┴────────────────┴─┤{2:~ }| + │{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| + {2:~ }│{2:~ }| {3:[No Name] 0,0-1 All}| | ]], attr_ids={ diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index 8afc69a649..22589fb107 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -104,12 +104,12 @@ describe('highlight defaults', function() }) feed_command('sp', 'vsp', 'vsp') screen:expect([[ - ^ {2:│} {2:│} | - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| + ^ │ │ | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {1:[No Name] }{2:[No Name] [No Name] }| | {0:~ }| @@ -122,12 +122,12 @@ describe('highlight defaults', function() -- navigate to verify that the attributes are properly moved feed('<c-w>j') screen:expect([[ - {2:│} {2:│} | - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| + │ │ | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {2:[No Name] [No Name] [No Name] }| ^ | {0:~ }| @@ -142,12 +142,12 @@ describe('highlight defaults', function() -- (upstream vim has the same behavior) feed('<c-w>k<c-w>l') screen:expect([[ - {2:│}^ {2:│} | - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| + │^ │ | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {2:[No Name] }{1:[No Name] }{2:[No Name] }| | {0:~ }| @@ -159,12 +159,12 @@ describe('highlight defaults', function() ]]) feed('<c-w>l') screen:expect([[ - {2:│} {2:│}^ | - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| + │ │^ | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {2:[No Name] [No Name] }{1:[No Name] }| | {0:~ }| @@ -176,12 +176,12 @@ describe('highlight defaults', function() ]]) feed('<c-w>h<c-w>h') screen:expect([[ - ^ {2:│} {2:│} | - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| - {0:~ }{2:│}{0:~ }{2:│}{0:~ }| + ^ │ │ | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {1:[No Name] }{2:[No Name] [No Name] }| | {0:~ }| @@ -1185,31 +1185,31 @@ describe('CursorLine and CursorLineNr highlights', function() feed('<esc>gg') command('windo diffthis') screen:expect([[ - {1: }{7:line 1 some text }{4:│}{1: }{7:^line 1 some text }| - {1: }{3:line 2 mo}{2:Re text!}{3: }{4:│}{1: }{3:line 2 mo}{2:re text}{3: }| - {1: }{5:extra line! }{4:│}{1: }{6:----------------------}| - {1: }extra line! {4:│}{1: }extra line! | - {1: }extra line! {4:│}{1: }extra line! | - {1: }last line ... {4:│}{1: }last line ... | - {1: } {4:│}{1: } | - {8:~ }{4:│}{8:~ }| - {8:~ }{4:│}{8:~ }| - {8:~ }{4:│}{8:~ }| + {1: }{7:line 1 some text }│{1: }{7:^line 1 some text }| + {1: }{3:line 2 mo}{2:Re text!}{3: }│{1: }{3:line 2 mo}{2:re text}{3: }| + {1: }{5:extra line! }│{1: }{6:----------------------}| + {1: }extra line! │{1: }extra line! | + {1: }extra line! │{1: }extra line! | + {1: }last line ... │{1: }last line ... | + {1: } │{1: } | + {8:~ }│{8:~ }| + {8:~ }│{8:~ }| + {8:~ }│{8:~ }| {4:[No Name] [+] }{9:[No Name] [+] }| | ]]) feed('jjjjj') screen:expect([[ - {1: }line 1 some text {4:│}{1: }line 1 some text | - {1: }{3:line 2 mo}{2:Re text!}{3: }{4:│}{1: }{3:line 2 mo}{2:re text}{3: }| - {1: }{5:extra line! }{4:│}{1: }{6:----------------------}| - {1: }extra line! {4:│}{1: }extra line! | - {1: }extra line! {4:│}{1: }extra line! | - {1: }last line ... {4:│}{1: }last line ... | - {1: }{7: }{4:│}{1: }{7:^ }| - {8:~ }{4:│}{8:~ }| - {8:~ }{4:│}{8:~ }| - {8:~ }{4:│}{8:~ }| + {1: }line 1 some text │{1: }line 1 some text | + {1: }{3:line 2 mo}{2:Re text!}{3: }│{1: }{3:line 2 mo}{2:re text}{3: }| + {1: }{5:extra line! }│{1: }{6:----------------------}| + {1: }extra line! │{1: }extra line! | + {1: }extra line! │{1: }extra line! | + {1: }last line ... │{1: }last line ... | + {1: }{7: }│{1: }{7:^ }| + {8:~ }│{8:~ }| + {8:~ }│{8:~ }| + {8:~ }│{8:~ }| {4:[No Name] [+] }{9:[No Name] [+] }| | ]]) @@ -1219,16 +1219,16 @@ describe('CursorLine and CursorLineNr highlights', function() command('hi CursorLine ctermbg=red ctermfg=NONE guibg=red guifg=NONE') feed('kkkk') screen:expect([[ - {1: }line 1 some text {4:│}{1: }line 1 some text | - {1: }{11:line 2 mo}{12:Re text!}{11: }{4:│}{1: }{11:^line 2 mo}{12:re text}{11: }| - {1: }{5:extra line! }{4:│}{1: }{6:----------------------}| - {1: }extra line! {4:│}{1: }extra line! | - {1: }extra line! {4:│}{1: }extra line! | - {1: }last line ... {4:│}{1: }last line ... | - {1: } {4:│}{1: } | - {8:~ }{4:│}{8:~ }| - {8:~ }{4:│}{8:~ }| - {8:~ }{4:│}{8:~ }| + {1: }line 1 some text │{1: }line 1 some text | + {1: }{11:line 2 mo}{12:Re text!}{11: }│{1: }{11:^line 2 mo}{12:re text}{11: }| + {1: }{5:extra line! }│{1: }{6:----------------------}| + {1: }extra line! │{1: }extra line! | + {1: }extra line! │{1: }extra line! | + {1: }last line ... │{1: }last line ... | + {1: } │{1: } | + {8:~ }│{8:~ }| + {8:~ }│{8:~ }| + {8:~ }│{8:~ }| {4:[No Name] [+] }{9:[No Name] [+] }| | ]], { @@ -1274,31 +1274,31 @@ describe('CursorLine and CursorLineNr highlights', function() command('windo diffthis') command('1wincmd w') screen:expect([[ - {1: }{9: }{2:-------------------}{3:│}{1: }{9: 1 }{4:baz }| - {1: }{6: 1 }{5:^foo }{3:│}{1: }{6: 2 }{5:foo }| - {1: }{9: 2 }foo {3:│}{1: }{9: 3 }foo | - {1: }{9: 3 }bar {3:│}{1: }{9: 4 }bar | - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| + {1: }{9: }{2:-------------------}│{1: }{9: 1 }{4:baz }| + {1: }{6: 1 }{5:^foo }│{1: }{6: 2 }{5:foo }| + {1: }{9: 2 }foo │{1: }{9: 3 }foo | + {1: }{9: 3 }bar │{1: }{9: 4 }bar | + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| {8:[No Name] [+] }{3:[No Name] [+] }| | ]]) command('set cursorlineopt=number') screen:expect([[ - {1: }{9: }{2:-------------------}{3:│}{1: }{9: 1 }{4:baz }| - {1: }{6: 1 }^foo {3:│}{1: }{6: 2 }{5:foo }| - {1: }{9: 2 }foo {3:│}{1: }{9: 3 }foo | - {1: }{9: 3 }bar {3:│}{1: }{9: 4 }bar | - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| - {7:~ }{3:│}{7:~ }| + {1: }{9: }{2:-------------------}│{1: }{9: 1 }{4:baz }| + {1: }{6: 1 }^foo │{1: }{6: 2 }{5:foo }| + {1: }{9: 2 }foo │{1: }{9: 3 }foo | + {1: }{9: 3 }bar │{1: }{9: 4 }bar | + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| + {7:~ }│{7:~ }| {8:[No Name] [+] }{3:[No Name] [+] }| | ]]) diff --git a/test/functional/ui/hlstate_spec.lua b/test/functional/ui/hlstate_spec.lua index dcea2c76dd..925af11627 100644 --- a/test/functional/ui/hlstate_spec.lua +++ b/test/functional/ui/hlstate_spec.lua @@ -14,6 +14,7 @@ describe('ext_hlstate detailed highlights', function() before_each(function() clear() command('syntax on') + command('hi VertSplit gui=reverse') screen = Screen.new(40, 8) screen:attach({ext_hlstate=true}) end) @@ -59,7 +60,7 @@ describe('ext_hlstate detailed highlights', function() it('work with cleared UI highlights', function() screen:set_default_attr_ids({ - [1] = {{}, {{hi_name = "VertSplit", ui_name = "WinSeparator", kind = "ui"}}}, + [1] = {{}, {{hi_name = "Normal", ui_name = "WinSeparator", kind = "ui"}}}, [2] = {{bold = true, foreground = Screen.colors.Blue1}, {{hi_name = "NonText", ui_name = "EndOfBuffer", kind = "ui"}}}, [3] = {{bold = true, reverse = true}, diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 10700d9508..879c44773a 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -1858,26 +1858,26 @@ describe("'inccommand' split windows", function() feed_command("split") feed(":%s/tw") screen:expect([[ - Inc substitution on {10:│}Inc substitution on| - {12:tw}o lines {10:│}{12:tw}o lines | - {10:│} | - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {11:[No Name] [+] }{10:│}{15:~ }| - Inc substitution on {10:│}{15:~ }| - {12:tw}o lines {10:│}{15:~ }| - {10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| + Inc substitution on │Inc substitution on| + {12:tw}o lines │{12:tw}o lines | + │ | + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {11:[No Name] [+] }│{15:~ }| + Inc substitution on │{15:~ }| + {12:tw}o lines │{15:~ }| + │{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| {10:[No Name] [+] [No Name] [+] }| |2| {12:tw}o lines | {15:~ }| @@ -1897,20 +1897,20 @@ describe("'inccommand' split windows", function() feed(":%s/tw") screen:expect([[ - Inc substitution on {10:│}Inc substitution on| - {12:tw}o lines {10:│}{12:tw}o lines | - {10:│} | - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| - {15:~ }{10:│}{15:~ }| + Inc substitution on │Inc substitution on| + {12:tw}o lines │{12:tw}o lines | + │ | + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| + {15:~ }│{15:~ }| {11:[No Name] [+] }{10:[No Name] [+] }| Inc substitution on | {12:tw}o lines | diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua index 07582ba602..0f4e97088c 100644 --- a/test/functional/ui/input_spec.lua +++ b/test/functional/ui/input_spec.lua @@ -313,11 +313,6 @@ it('unsimplified mapping works when there was a partial match vim-patch:8.2.4504 expect('xb') end) -it('rhs of a mapping is not simplified', function() - command('nnoremap <Plug>foo <C-J>') - eq('<C-J>', funcs.maparg('<Plug>foo')) -end) - describe('input non-printable chars', function() after_each(function() os.remove('Xtest-overwrite') diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 3320f53d86..ee1e37c675 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1223,7 +1223,7 @@ describe('ui/ext_messages', function() {1:~ }| {1:~ }| {1:~ }| - {6:────────────────────────────────────────────────────────────────────────────────}| + ────────────────────────────────────────────────────────────────────────────────| | {1:~ }| {1:~ }| @@ -1256,7 +1256,7 @@ describe('ui/ext_messages', function() {1:~ }| {1:~ }| {1:~ }| - {6:────────────────────────────────────────────────────────────────────────────────}| + ────────────────────────────────────────────────────────────────────────────────| | {1:~ }| {1:~ }| @@ -1291,7 +1291,7 @@ describe('ui/ext_messages', function() {1:~ }| {1:~ }| {1:~ }| - {6:────────────────────────────────────────────────────────────────────────────────}| + ────────────────────────────────────────────────────────────────────────────────| | {1:~ }| {1:~ }| @@ -1312,7 +1312,6 @@ end) describe('ui/msg_puts_printf', function() it('output multibyte characters correctly', function() - if helpers.pending_win32(pending) then return end local screen local cmd = '' local locale_dir = test_build_dir..'/share/locale/ja/LC_MESSAGES' diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index 8d3c312def..e5284894cb 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -595,54 +595,54 @@ describe('ui/mouse/input', function() feed('ifoo\nbar<esc>') screen:expect{grid=[[ - testing {4:│}testing | - mouse {4:│}mouse | - support and selection {4:│}support and selection | - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│[No Name] [+] }| - {0:~ }{4:│}foo{0:$} | - {0:~ }{4:│}ba^r{0:$} | - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| + testing │testing | + mouse │mouse | + support and selection │support and selection | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{4:[No Name] [+] }| + {0:~ }│foo{0:$} | + {0:~ }│ba^r{0:$} | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| {4:[No Name] [+] }{5:[No Name] [+] }| | ]]} meths.input_mouse('left', 'press', '', 0, 6, 27) screen:expect{grid=[[ - testing {4:│}testing | - mouse {4:│}mouse | - support and selection {4:│}support and selection | - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│[No Name] [+] }| - {0:~ }{4:│}^foo{0:$} | - {0:~ }{4:│}bar{0:$} | - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| + testing │testing | + mouse │mouse | + support and selection │support and selection | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{4:[No Name] [+] }| + {0:~ }│^foo{0:$} | + {0:~ }│bar{0:$} | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| {4:[No Name] [+] }{5:[No Name] [+] }| | ]]} meths.input_mouse('left', 'drag', '', 0, 7, 30) screen:expect{grid=[[ - testing {4:│}testing | - mouse {4:│}mouse | - support and selection {4:│}support and selection | - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│[No Name] [+] }| - {0:~ }{4:│}{1:foo}{3:$} | - {0:~ }{4:│}{1:bar}{0:^$} | - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| - {0:~ }{4:│}{0:~ }| + testing │testing | + mouse │mouse | + support and selection │support and selection | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{4:[No Name] [+] }| + {0:~ }│{1:foo}{3:$} | + {0:~ }│{1:bar}{0:^$} | + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| + {0:~ }│{0:~ }| {4:[No Name] [+] }{5:[No Name] [+] }| {2:-- VISUAL --} | ]]} @@ -729,12 +729,12 @@ describe('ui/mouse/input', function() feed('k') feed_command('sp', 'vsp') screen:expect([[ - lines {4:│}lines | - to {4:│}to | - test {4:│}test | - ^mouse scrolling {4:│}mouse scrolling | - {4:│} | - {0:~ }{4:│}{0:~ }| + lines │lines | + to │to | + test │test | + ^mouse scrolling │mouse scrolling | + │ | + {0:~ }│{0:~ }| {5:[No Name] [+] }{4:[No Name] [+] }| to | test | @@ -750,12 +750,12 @@ describe('ui/mouse/input', function() feed('<ScrollWheelDown><0,0>') end screen:expect([[ - ^mouse scrolling {4:│}lines | - {4:│}to | - {0:~ }{4:│}test | - {0:~ }{4:│}mouse scrolling | - {0:~ }{4:│} | - {0:~ }{4:│}{0:~ }| + ^mouse scrolling │lines | + │to | + {0:~ }│test | + {0:~ }│mouse scrolling | + {0:~ }│ | + {0:~ }│{0:~ }| {5:[No Name] [+] }{4:[No Name] [+] }| to | test | @@ -771,12 +771,12 @@ describe('ui/mouse/input', function() feed('<ScrollWheelUp><27,0>') end screen:expect([[ - ^mouse scrolling {4:│}text | - {4:│}with | - {0:~ }{4:│}many | - {0:~ }{4:│}lines | - {0:~ }{4:│}to | - {0:~ }{4:│}test | + ^mouse scrolling │text | + │with | + {0:~ }│many | + {0:~ }│lines | + {0:~ }│to | + {0:~ }│test | {5:[No Name] [+] }{4:[No Name] [+] }| to | test | @@ -793,12 +793,12 @@ describe('ui/mouse/input', function() feed('<ScrollWheelUp><27,7><ScrollWheelUp>') end screen:expect([[ - ^mouse scrolling {4:│}text | - {4:│}with | - {0:~ }{4:│}many | - {0:~ }{4:│}lines | - {0:~ }{4:│}to | - {0:~ }{4:│}test | + ^mouse scrolling │text | + │with | + {0:~ }│many | + {0:~ }│lines | + {0:~ }│to | + {0:~ }│test | {5:[No Name] [+] }{4:[No Name] [+] }| Inserting | text | diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua index 4e5e9c3a71..0fba55e76b 100644 --- a/test/functional/ui/multigrid_spec.lua +++ b/test/functional/ui/multigrid_spec.lua @@ -77,18 +77,18 @@ describe('ext_multigrid', function() command('vsplit') screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {11:[No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -129,18 +129,18 @@ describe('ext_multigrid', function() command('split') screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}{11:[No Name] }| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│{11:[No Name] }| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {12:[No Name] [No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -300,12 +300,12 @@ describe('ext_multigrid', function() command('vsp') screen:expect{grid=[[ ## grid 1 - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| {11:[No Name] }{12:[No Name] [No Name] }| [2:-----------------------------------------------------]| [2:-----------------------------------------------------]| @@ -347,12 +347,12 @@ describe('ext_multigrid', function() insert('hello') screen:expect{grid=[[ ## grid 1 - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| - [6:--------------------]{12:│}[5:----------------]{12:│}[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| + [6:--------------------]│[5:----------------]│[4:---------------]| {11:[No Name] [+] }{12:[No Name] [+] [No Name] [+] }| [2:-----------------------------------------------------]| [2:-----------------------------------------------------]| @@ -467,18 +467,18 @@ describe('ext_multigrid', function() command('vsp') screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {11:[No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -516,18 +516,18 @@ describe('ext_multigrid', function() command('vertical resize 10') screen:expect{grid=[[ ## grid 1 - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| - [4:----------]{12:│}[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| + [4:----------]│[2:------------------------------------------]| {11:<No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -565,18 +565,18 @@ describe('ext_multigrid', function() command('sp') screen:expect{grid=[[ ## grid 1 - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - {11:[No Name] }{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + {11:[No Name] }│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {12:[No Name] [No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -611,18 +611,18 @@ describe('ext_multigrid', function() insert('hello') screen:expect{grid=[[ ## grid 1 - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - {11:[No Name] [+] }{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + {11:[No Name] [+] }│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {12:[No Name] [+] [No Name] [+] }| [3:-----------------------------------------------------]| ## grid 2 @@ -659,18 +659,18 @@ describe('ext_multigrid', function() command('vsp') screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {11:[No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -1056,12 +1056,12 @@ describe('ext_multigrid', function() command('vsp') screen:expect{grid=[[ ## grid 1 - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| {11:[No Name] }{12:[No Name] }| [2:-----------------------------------------------------]| [2:-----------------------------------------------------]| @@ -1097,12 +1097,12 @@ describe('ext_multigrid', function() feed(":echoerr 'very' | echoerr 'much' | echoerr 'fail'<cr>") screen:expect{grid=[[ ## grid 1 - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| {11:[No Name] }{12:[No Name] }| [2:-----------------------------------------------------]| [2:-----------------------------------------------------]| @@ -1141,12 +1141,12 @@ describe('ext_multigrid', function() feed('<cr>') screen:expect{grid=[[ ## grid 1 - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| {11:[No Name] }{12:[No Name] }| [2:-----------------------------------------------------]| [2:-----------------------------------------------------]| @@ -1242,12 +1242,12 @@ describe('ext_multigrid', function() feed("<c-c>") screen:expect{grid=[[ ## grid 1 - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| - [5:--------------------------]{12:│}[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| + [5:--------------------------]│[4:--------------------------]| {11:[No Name] }{12:[No Name] }| [2:-----------------------------------------------------]| [2:-----------------------------------------------------]| @@ -1285,18 +1285,18 @@ describe('ext_multigrid', function() command('vsp') screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {11:[No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -1453,17 +1453,17 @@ describe('ext_multigrid', function() screen:expect{grid=[[ ## grid 1 {7: }{18:2}{7: [No Name] }{16: }{17:2}{16: [No Name] }{12: }{16:X}| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {11:[No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -1637,18 +1637,18 @@ describe('ext_multigrid', function() command('tabclose') screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {11:[No Name] }{12:[No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -1960,13 +1960,13 @@ describe('ext_multigrid', function() [4:-----------------------------------------------------]| [4:-----------------------------------------------------]| {12:[No Name] [+] }| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| - [5:--------------------------]{12:│}[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| + [5:--------------------------]│[2:--------------------------]| {11:[No Name] [+] }{12:[No Name] [+] }| [3:-----------------------------------------------------]| ## grid 2 @@ -2002,13 +2002,13 @@ describe('ext_multigrid', function() [4:-----------------------------------------------------]| [4:-----------------------------------------------------]| {12:[No Name] [+] }| - [5:------------------------------]{12:│}[2:----------------------]| - [5:------------------------------]{12:│}[2:----------------------]| - [5:------------------------------]{12:│}[2:----------------------]| - [5:------------------------------]{12:│}[2:----------------------]| - [5:------------------------------]{12:│}[2:----------------------]| - [5:------------------------------]{12:│}[2:----------------------]| - [5:------------------------------]{12:│}[2:----------------------]| + [5:------------------------------]│[2:----------------------]| + [5:------------------------------]│[2:----------------------]| + [5:------------------------------]│[2:----------------------]| + [5:------------------------------]│[2:----------------------]| + [5:------------------------------]│[2:----------------------]| + [5:------------------------------]│[2:----------------------]| + [5:------------------------------]│[2:----------------------]| {11:[No Name] [+] }{12:[No Name] [+] }| [3:-----------------------------------------------------]| ## grid 2 @@ -2049,18 +2049,18 @@ describe('ext_multigrid', function() screen:expect{grid=[[ ## grid 1 - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}[5:--------------------------]| - [4:--------------------------]{12:│}{11:[No Name] [+] }| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| - [4:--------------------------]{12:│}[2:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│[5:--------------------------]| + [4:--------------------------]│{11:[No Name] [+] }| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| + [4:--------------------------]│[2:--------------------------]| {12:[No Name] [No Name] }| [3:-----------------------------------------------------]| ## grid 2 @@ -2369,4 +2369,44 @@ describe('ext_multigrid', function() [2] = {win = {id = 1000}, topline = 6, botline = 12, curline = 10, curcol = 1, linecount = 11}, }} end) + + it('with winbar', function() + command 'split' + command 'setlocal winbar=very\\ bar' + screen:expect{grid=[[ + ## grid 1 + [4:-----------------------------------------------------]| + [4:-----------------------------------------------------]| + [4:-----------------------------------------------------]| + [4:-----------------------------------------------------]| + [4:-----------------------------------------------------]| + [4:-----------------------------------------------------]| + {11:[No Name] }| + [2:-----------------------------------------------------]| + [2:-----------------------------------------------------]| + [2:-----------------------------------------------------]| + [2:-----------------------------------------------------]| + [2:-----------------------------------------------------]| + {12:[No Name] }| + [3:-----------------------------------------------------]| + ## grid 2 + | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ## grid 3 + | + ## grid 4 + {7:very bar }| + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]], win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + }} + end) end) diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index 7305baa761..50e5dfac84 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -14,7 +14,6 @@ local has_powershell = helpers.has_powershell local set_shell_powershell = helpers.set_shell_powershell describe("shell command :!", function() - if helpers.pending_win32(pending) then return end local screen before_each(function() clear() diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 067d3eef4a..ef65dbd2bd 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -953,72 +953,72 @@ describe('builtin popupmenu', function() insert('aaa aab aac\n') feed(':vsplit<cr>') screen:expect([[ - aaa aab aac {3:│}aaa aab aac| - ^ {3:│} | - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| + aaa aab aac │aaa aab aac| + ^ │ | + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| {4:[No Name] [+] }{3:<Name] [+] }| :vsplit | ]]) feed('ibbb a<c-x><c-n>') screen:expect([[ - aaa aab aac {3:│}aaa aab aac| - bbb aaa^ {3:│}bbb aaa | - {1:~ }{s: aaa }{1: }{3:│}{1:~ }| - {1:~ }{n: aab }{1: }{3:│}{1:~ }| - {1:~ }{n: aac }{1: }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| + aaa aab aac │aaa aab aac| + bbb aaa^ │bbb aaa | + {1:~ }{s: aaa }{1: }│{1:~ }| + {1:~ }{n: aab }{1: }│{1:~ }| + {1:~ }{n: aac }{1: }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| {4:[No Name] [+] }{3:<Name] [+] }| {2:-- }{5:match 1 of 3} | ]]) feed('<esc><c-w><c-w>oc a<c-x><c-n>') screen:expect([[ - aaa aab aac{3:│}aaa aab aac | - bbb aaa {3:│}bbb aaa | - c aaa {3:│}c aaa^ | - {1:~ }{3:│}{1:~}{s: aaa }{1: }| - {1:~ }{3:│}{1:~}{n: aab }{1: }| - {1:~ }{3:│}{1:~}{n: aac }{1: }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| - {1:~ }{3:│}{1:~ }| + aaa aab aac│aaa aab aac | + bbb aaa │bbb aaa | + c aaa │c aaa^ | + {1:~ }│{1:~}{s: aaa }{1: }| + {1:~ }│{1:~}{n: aab }{1: }| + {1:~ }│{1:~}{n: aac }{1: }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| {3:<Name] [+] }{4:[No Name] [+] }| {2:-- }{5:match 1 of 3} | ]]) diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 09bcbc2bbd..6c872e52d3 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -326,12 +326,12 @@ local function screen_tests(linegrid) command('vsp') command('vsp') screen:expect([[ - ^ {3:│} {3:│} | - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + ^ │ │ | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {1:[No Name] }{3:[No Name] [No Name] }| | {0:~ }| @@ -343,12 +343,12 @@ local function screen_tests(linegrid) ]]) insert('hello') screen:expect([[ - hell^o {3:│}hello {3:│}hello | - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + hell^o │hello │hello | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| hello | {0:~ }| @@ -369,12 +369,12 @@ local function screen_tests(linegrid) command('vsp') insert('hello') screen:expect([[ - hell^o {3:│}hello {3:│}hello | - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + hell^o │hello │hello | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| hello | {0:~ }| @@ -406,12 +406,12 @@ local function screen_tests(linegrid) command('tabprevious') screen:expect([[ {2: }{6:4}{2:+ [No Name] }{4: + [No Name] }{3: }{4:X}| - hell^o {3:│}hello {3:│}hello | - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| - {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + hell^o │hello │hello | + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| + {0:~ }│{0:~ }│{0:~ }| {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| hello | {0:~ }| @@ -520,36 +520,36 @@ local function screen_tests(linegrid) command('vsplit') screen:expect([[ - ^foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | + ^foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | + foo │foo | {1:[No Name] [+] }{3:[No Name] [+] }| | ]]) feed('<PageDown>') screen:expect([[ - ^foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - foo {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | - bar {3:│}foo | + ^foo │foo | + foo │foo | + foo │foo | + foo │foo | + bar │foo | + bar │foo | + bar │foo | + bar │foo | + bar │foo | + bar │foo | + bar │foo | + bar │foo | {1:[No Name] [+] }{3:[No Name] [+] }| | ]]) @@ -748,12 +748,12 @@ local function screen_tests(linegrid) command('vsp') command('vsp') screen:expect([[ - and {3:│}and {3:│}and | - clearing {3:│}clearing {3:│}clearing | - in {3:│}in {3:│}in | - split {3:│}split {3:│}split | - windows {3:│}windows {3:│}windows | - ^ {3:│} {3:│} | + and │and │and | + clearing │clearing │clearing | + in │in │in | + split │split │split | + windows │windows │windows | + ^ │ │ | {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| clearing | in | @@ -768,12 +768,12 @@ local function screen_tests(linegrid) it('only affects the current scroll region', function() feed('6k') screen:expect([[ - ^scrolling {3:│}and {3:│}and | - and {3:│}clearing {3:│}clearing | - clearing {3:│}in {3:│}in | - in {3:│}split {3:│}split | - split {3:│}windows {3:│}windows | - windows {3:│} {3:│} | + ^scrolling │and │and | + and │clearing │clearing | + clearing │in │in | + in │split │split | + split │windows │windows | + windows │ │ | {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| clearing | in | @@ -785,12 +785,12 @@ local function screen_tests(linegrid) ]]) feed('<c-w>l') screen:expect([[ - scrolling {3:│}and {3:│}and | - and {3:│}clearing {3:│}clearing | - clearing {3:│}in {3:│}in | - in {3:│}split {3:│}split | - split {3:│}windows {3:│}windows | - windows {3:│}^ {3:│} | + scrolling │and │and | + and │clearing │clearing | + clearing │in │in | + in │split │split | + split │windows │windows | + windows │^ │ | {3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }| clearing | in | @@ -802,12 +802,12 @@ local function screen_tests(linegrid) ]]) feed('gg') screen:expect([[ - scrolling {3:│}^Inserting {3:│}and | - and {3:│}text {3:│}clearing | - clearing {3:│}with {3:│}in | - in {3:│}many {3:│}split | - split {3:│}lines {3:│}windows | - windows {3:│}to {3:│} | + scrolling │^Inserting │and | + and │text │clearing | + clearing │with │in | + in │many │split | + split │lines │windows | + windows │to │ | {3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }| clearing | in | @@ -819,12 +819,12 @@ local function screen_tests(linegrid) ]]) feed('7j') screen:expect([[ - scrolling {3:│}with {3:│}and | - and {3:│}many {3:│}clearing | - clearing {3:│}lines {3:│}in | - in {3:│}to {3:│}split | - split {3:│}test {3:│}windows | - windows {3:│}^scrolling {3:│} | + scrolling │with │and | + and │many │clearing | + clearing │lines │in | + in │to │split | + split │test │windows | + windows │^scrolling │ | {3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }| clearing | in | @@ -836,12 +836,12 @@ local function screen_tests(linegrid) ]]) feed('2j') screen:expect([[ - scrolling {3:│}lines {3:│}and | - and {3:│}to {3:│}clearing | - clearing {3:│}test {3:│}in | - in {3:│}scrolling {3:│}split | - split {3:│}and {3:│}windows | - windows {3:│}^clearing {3:│} | + scrolling │lines │and | + and │to │clearing | + clearing │test │in | + in │scrolling │split | + split │and │windows | + windows │^clearing │ | {3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }| clearing | in | @@ -853,12 +853,12 @@ local function screen_tests(linegrid) ]]) feed('5k') screen:expect([[ - scrolling {3:│}^lines {3:│}and | - and {3:│}to {3:│}clearing | - clearing {3:│}test {3:│}in | - in {3:│}scrolling {3:│}split | - split {3:│}and {3:│}windows | - windows {3:│}clearing {3:│} | + scrolling │^lines │and | + and │to │clearing | + clearing │test │in | + in │scrolling │split | + split │and │windows | + windows │clearing │ | {3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }| clearing | in | @@ -870,12 +870,12 @@ local function screen_tests(linegrid) ]]) feed('k') screen:expect([[ - scrolling {3:│}^many {3:│}and | - and {3:│}lines {3:│}clearing | - clearing {3:│}to {3:│}in | - in {3:│}test {3:│}split | - split {3:│}scrolling {3:│}windows | - windows {3:│}and {3:│} | + scrolling │^many │and | + and │lines │clearing | + clearing │to │in | + in │test │split | + split │scrolling │windows | + windows │and │ | {3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }| clearing | in | diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua new file mode 100644 index 0000000000..abc6088801 --- /dev/null +++ b/test/functional/ui/winbar_spec.lua @@ -0,0 +1,197 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear = helpers.clear +local command = helpers.command +local insert = helpers.insert +local meths = helpers.meths +local eq = helpers.eq + +describe('winbar', function() + local screen + + before_each(function() + clear() + screen = Screen.new(60, 13) + screen:attach() + screen:set_default_attr_ids({ + [1] = {bold = true}, + [2] = {reverse = true}, + [3] = {bold = true, foreground = Screen.colors.Blue}, + [4] = {bold = true, reverse = true}, + [5] = {bold = true, foreground = Screen.colors.Red}, + [6] = {foreground = Screen.colors.Blue}, + }) + command('set winbar=Set\\ Up\\ The\\ Bars') + end) + it('works', function() + screen:expect([[ + {1:Set Up The Bars }| + ^ | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]) + end) + it('works with custom \'fillchars\' value', function() + command('set fillchars=wbr:+') + screen:expect([[ + {1:Set Up The Bars+++++++++++++++++++++++++++++++++++++++++++++}| + ^ | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]) + end) + it('works with custom highlight', function() + command('hi WinBar guifg=red') + screen:expect([[ + {5:Set Up The Bars }| + ^ | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]) + end) + it('works with splits', function() + command('hi WinBar guifg=red') + command('hi WinBarNC guifg=blue') + command('belowright vsplit | split | split') + screen:expect([[ + {6:Set Up The Bars }│{5:Set Up The Bars }| + │^ | + {3:~ }│{3:~ }| + {3:~ }│{4:[No Name] }| + {3:~ }│{6:Set Up The Bars }| + {3:~ }│ | + {3:~ }│{3:~ }| + {3:~ }│{2:[No Name] }| + {3:~ }│{6:Set Up The Bars }| + {3:~ }│ | + {3:~ }│{3:~ }| + {2:[No Name] [No Name] }| + | + ]]) + end) + it('works when switching value of \'winbar\'', function() + command('belowright vsplit | split | split | set winbar=') + screen:expect([[ + │^ | + {3:~ }│{3:~ }| + {3:~ }│{3:~ }| + {3:~ }│{4:[No Name] }| + {3:~ }│ | + {3:~ }│{3:~ }| + {3:~ }│{3:~ }| + {3:~ }│{2:[No Name] }| + {3:~ }│ | + {3:~ }│{3:~ }| + {3:~ }│{3:~ }| + {2:[No Name] [No Name] }| + | + ]]) + command('set winbar=All\\ Your\\ Bar\\ Are\\ Belong\\ To\\ Us') + screen:expect([[ + {1:All Your Bar Are Belong To Us}│{1:All Your Bar Are Belong To Us }| + │^ | + {3:~ }│{3:~ }| + {3:~ }│{4:[No Name] }| + {3:~ }│{1:All Your Bar Are Belong To Us }| + {3:~ }│ | + {3:~ }│{3:~ }| + {3:~ }│{2:[No Name] }| + {3:~ }│{1:All Your Bar Are Belong To Us }| + {3:~ }│ | + {3:~ }│{3:~ }| + {2:[No Name] [No Name] }| + | + ]]) + command('set winbar=Changed\\ winbar') + screen:expect([[ + {1:Changed winbar }│{1:Changed winbar }| + │^ | + {3:~ }│{3:~ }| + {3:~ }│{4:[No Name] }| + {3:~ }│{1:Changed winbar }| + {3:~ }│ | + {3:~ }│{3:~ }| + {3:~ }│{2:[No Name] }| + {3:~ }│{1:Changed winbar }| + {3:~ }│ | + {3:~ }│{3:~ }| + {2:[No Name] [No Name] }| + | + ]]) + end) + it('works with laststatus=3', function() + command('set laststatus=3') + screen:expect([[ + {1:Set Up The Bars }| + ^ | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {4:[No Name] }| + | + ]]) + command('belowright vsplit | split | split') + screen:expect([[ + {1:Set Up The Bars }│{1:Set Up The Bars }| + │^ | + {3:~ }│{3:~ }| + {3:~ }├──────────────────────────────| + {3:~ }│{1:Set Up The Bars }| + {3:~ }│ | + {3:~ }│{3:~ }| + {3:~ }├──────────────────────────────| + {3:~ }│{1:Set Up The Bars }| + {3:~ }│ | + {3:~ }│{3:~ }| + {4:[No Name] }| + | + ]]) + end) + it('sets correct position on mouse click', function() + insert[[ + line 1 + line 2 + line 3 + line 4 + line -42 + line i + line sin(theta) + line 8 + ]] + meths.input_mouse('left', 'press', '', 0, 5, 1) + eq({5, 1}, meths.win_get_cursor(0)) + end) +end) |