diff options
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/107_adjust_window_and_contents_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/legacy/arglist_spec.lua | 18 | ||||
-rw-r--r-- | test/functional/legacy/cmdline_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/legacy/cpoptions_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/legacy/display_spec.lua | 20 | ||||
-rw-r--r-- | test/functional/legacy/highlight_spec.lua | 14 | ||||
-rw-r--r-- | test/functional/legacy/options_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/legacy/prompt_buffer_spec.lua | 76 | ||||
-rw-r--r-- | test/functional/legacy/put_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/legacy/scroll_opt_spec.lua | 355 | ||||
-rw-r--r-- | test/functional/legacy/window_cmd_spec.lua | 152 |
11 files changed, 334 insertions, 325 deletions
diff --git a/test/functional/legacy/107_adjust_window_and_contents_spec.lua b/test/functional/legacy/107_adjust_window_and_contents_spec.lua index 5a8fdda32d..f4d9d375b3 100644 --- a/test/functional/legacy/107_adjust_window_and_contents_spec.lua +++ b/test/functional/legacy/107_adjust_window_and_contents_spec.lua @@ -50,7 +50,7 @@ describe('107', function() [1, '1 '] | [50, '50 '] | ^[59, '59 '] | - ~ |*9 + {1:~ }|*9 3 more lines | ]]) end) diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index 3e78d7ca5f..d1764d9702 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -24,26 +24,26 @@ describe('argument list commands', function() feed(':confirm quit\n') screen:expect([[ | - ~ | - | + {1:~ }| + {3: }| :confirm quit | - 2 more files to edit. Quit anyway? | - [Y]es, (N)o: ^ | + {6:2 more files to edit. Quit anyway?} | + {6:[Y]es, (N)o: }^ | ]]) feed('N') screen:expect([[ ^ | - ~ |*4 + {1:~ }|*4 | ]]) feed(':confirm quit\n') screen:expect([[ | - ~ | - | + {1:~ }| + {3: }| :confirm quit | - 2 more files to edit. Quit anyway? | - [Y]es, (N)o: ^ | + {6:2 more files to edit. Quit anyway?} | + {6:[Y]es, (N)o: }^ | ]]) expect_exit(1000, feed, 'Y') end) diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua index 8c94451f9a..4d450965cf 100644 --- a/test/functional/legacy/cmdline_spec.lua +++ b/test/functional/legacy/cmdline_spec.lua @@ -93,8 +93,8 @@ describe('cmdline', function() feed_command('DoSomething') screen:expect([[ | - ~ |*2 - | + {1:~ }|*2 + {3: }| Executing: DoSomething | Executing: echo 'hello' |set ts=4 |let v = '123' |echo v | hello | @@ -102,7 +102,7 @@ describe('cmdline', function() Executing: let v = '123' |echo v | Executing: echo v | 123 | - Press ENTER or type command to continue^ | + {6:Press ENTER or type command to continue}^ | ]]) end) diff --git a/test/functional/legacy/cpoptions_spec.lua b/test/functional/legacy/cpoptions_spec.lua index 288146199a..b8ecb5665d 100644 --- a/test/functional/legacy/cpoptions_spec.lua +++ b/test/functional/legacy/cpoptions_spec.lua @@ -15,13 +15,13 @@ describe('cpoptions', function() feed('c2w') screen:expect([[ ^one tw$ three | - ~ |*4 - -- INSERT -- | + {1:~ }|*4 + {5:-- INSERT --} | ]]) feed('vim<Esc>') screen:expect([[ vi^m three | - ~ |*4 + {1:~ }|*4 | ]]) end) diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 153fad2e22..948f9df1aa 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -149,7 +149,7 @@ describe('display', function() ]]) feed('736|') screen:expect([[ - <<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:<<<}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*11 ^aaaaaaaaaaaaaaa | | @@ -157,22 +157,22 @@ describe('display', function() -- The correct part of the last line is moved into view. feed('D') screen:expect([[ - <<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:<<<}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^a| - bbbbb bbbbb bbbbb bbbbb bbbbb bb@@@| + bbbbb bbbbb bbbbb bbbbb bbbbb bb{1:@@@}| | ]]) -- "w_skipcol" does not change because the topline is still long enough -- to maintain the current skipcol. feed('g04l11gkD') screen:expect([[ - <<<^a | + {1:<<<}^a | bbbbb bbbbb bbbbb bbbbb bbbbb bbbbb| bbbbb ccccc ccccc ccccc ccccc cccc| c ccccc ccccc ddddd ddddd ddddd ddd| dd ddddd ddddd ddddd | - ~ |*8 + {1:~ }|*8 | ]]) -- "w_skipcol" is reset to bring the entire topline into view because @@ -183,7 +183,7 @@ describe('display', function() aa^a | bbbbb bbbbb bbbbb bbbbb bbbbb bbbbb| bbbbb ccccc ccccc ccccc ccccc cccc| - c ccccc ccccc ddddd ddddd ddddd @@@| + c ccccc ccccc ddddd ddddd ddddd {1:@@@}| | ]]) end) @@ -197,7 +197,7 @@ describe('display', function() norm $j ]]) screen:expect([[ - <<<bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {1:<<<}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*5 b^b | | @@ -207,7 +207,7 @@ describe('display', function() exec('set number cpo+=n scrolloff=0') feed('$0') screen:expect([[ - <<<b^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {1:<<<}b^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6 | ]]) @@ -215,14 +215,14 @@ describe('display', function() exec('set smoothscroll') feed('$b') screen:expect([[ - 2 b ^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {8: 2 }b ^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6 | ]]) -- Same for "ge". feed('$ge') screen:expect([[ - 2 ^b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {8: 2 }^b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6 | ]]) diff --git a/test/functional/legacy/highlight_spec.lua b/test/functional/legacy/highlight_spec.lua index 3d06bf3978..3791cb5e28 100644 --- a/test/functional/legacy/highlight_spec.lua +++ b/test/functional/legacy/highlight_spec.lua @@ -22,15 +22,15 @@ describe(':highlight', function() -- is discarded resulting in test failure screen:expect([[ :highlight | - SpecialKey xxx ctermfg=4 | - guifg=Blue | - EndOfBuffer xxx links to NonText| + SpecialKey {18:xxx} {18:ctermfg=}4 | + {18:guifg=}Blue | + EndOfBuffer {1:xxx} {18:links to} NonText| | - TermCursor xxx cterm=reverse | - gui=reverse | + TermCursor {2:xxx} {18:cterm=}reverse | + {18:gui=}reverse | TermCursorNC xxx cleared | - NonText xxx ctermfg=12 | - -- More --^ | + NonText {1:xxx} {18:ctermfg=}12 | + {6:-- More --}^ | ]]) feed('q') poke_eventloop() -- wait until we're back to normal diff --git a/test/functional/legacy/options_spec.lua b/test/functional/legacy/options_spec.lua index 2f20b6bd51..7440774cbd 100644 --- a/test/functional/legacy/options_spec.lua +++ b/test/functional/legacy/options_spec.lua @@ -66,11 +66,11 @@ describe('set', function() command('verbose set scroll?') screen:expect([[ | - ~ |*11 - | + {1:~ }|*11 + {3: }| scroll=7 | Last set from changed window size | - Press ENTER or type command to continue^ | + {6:Press ENTER or type command to continue}^ | ]]) end) diff --git a/test/functional/legacy/prompt_buffer_spec.lua b/test/functional/legacy/prompt_buffer_spec.lua index e4810feedb..5f553aca25 100644 --- a/test/functional/legacy/prompt_buffer_spec.lua +++ b/test/functional/legacy/prompt_buffer_spec.lua @@ -58,11 +58,11 @@ describe('prompt buffer', function() ]]) screen:expect([[ cmd: ^ | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) end @@ -79,15 +79,15 @@ describe('prompt buffer', function() Command: "hello" | Result: "hello" | cmd: ^ | - [Prompt] | + {3:[Prompt] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) feed('exit\n') screen:expect([[ ^other buffer | - ~ |*8 + {1:~ }|*8 | ]]) end) @@ -98,43 +98,43 @@ describe('prompt buffer', function() feed('hello<BS><BS>') screen:expect([[ cmd: hel^ | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) feed('<Left><Left><Left><BS>-') screen:expect([[ cmd: -^hel | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) feed('<C-O>lz') screen:expect([[ cmd: -hz^el | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) feed('<End>x') screen:expect([[ cmd: -hzelx^ | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) feed('<C-U>exit\n') screen:expect([[ ^other buffer | - ~ |*8 + {1:~ }|*8 | ]]) end) @@ -143,32 +143,30 @@ describe('prompt buffer', function() it('switch windows', function() source_script() feed('<C-O>:call SwitchWindows()<CR>') - screen:expect { - grid = [[ + screen:expect([[ cmd: | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {2:[Prompt] [+] }| ^other buffer | - ~ |*3 + {1:~ }|*3 | - ]], - } + ]]) feed('<C-O>:call SwitchWindows()<CR>') screen:expect([[ cmd: ^ | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 - -- INSERT -- | + {1:~ }|*3 + {5:-- INSERT --} | ]]) feed('<Esc>') screen:expect([[ cmd:^ | - ~ |*3 - [Prompt] [+] | + {1:~ }|*3 + {3:[Prompt] [+] }| other buffer | - ~ |*3 + {1:~ }|*3 | ]]) end) diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua index c78946d690..26f1501a4b 100644 --- a/test/functional/legacy/put_spec.lua +++ b/test/functional/legacy/put_spec.lua @@ -66,8 +66,8 @@ describe('put', function() three more text │ three more text | ^four more text │ four more text | │ | - ~ │~ |*2 - [No Name] [+] [No Name] [+] | + {1:~ }│{1:~ }|*2 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) end) diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 8d22c299d6..e8836f41db 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -23,9 +23,9 @@ describe('smoothscroll', function() set number ]]) feed('<C-Y>') - screen:expect({ any = ' 1 ^one' }) + screen:expect({ any = '{8: 1 }^one' }) feed('<C-E><C-E><C-E>') - screen:expect({ any = ' 2 ^two' }) + screen:expect({ any = '{8: 2 }^two' }) end) -- oldtest: Test_smoothscroll_CtrlE_CtrlY() @@ -43,28 +43,28 @@ describe('smoothscroll', function() long word long word long word | ^line | line |*2 - ~ |*2 + {1:~ }|*2 | ]] local s2 = [[ - <<<d word word word word word word word | + {1:<<<}d word word word word word word word | word word word word | line three | long word long word long word long word | long word long word long word | ^line | line |*2 - ~ |*3 + {1:~ }|*3 | ]] local s3 = [[ - <<<d word word word | + {1:<<<}d word word word | line three | long word long word long word long word | long word long word long word | ^line | line |*2 - ~ |*4 + {1:~ }|*4 | ]] local s4 = [[ @@ -73,28 +73,28 @@ describe('smoothscroll', function() long word long word long word | line |*2 ^line | - ~ |*5 + {1:~ }|*5 | ]] local s5 = [[ - <<<d word word word | + {1:<<<}d word word word | line three | long word long word long word long word | long word long word long word | line |*2 ^line | - ~ |*4 + {1:~ }|*4 | ]] local s6 = [[ - <<<d word word word word word word word | + {1:<<<}d word word word word word word word | word word word word | line three | long word long word long word long word | long word long word long word | line |*2 ^line | - ~ |*3 + {1:~ }|*3 | ]] local s7 = [[ @@ -105,7 +105,7 @@ describe('smoothscroll', function() long word long word long word | line |*2 ^line | - ~ |*2 + {1:~ }|*2 | ]] local s8 = [[ @@ -117,7 +117,7 @@ describe('smoothscroll', function() long word long word long word | line |*2 ^line | - ~ | + {1:~ }| | ]] feed('<C-E>') @@ -160,7 +160,7 @@ describe('smoothscroll', function() ϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛ^ϛϛϛϛϛ| ϛϛϛϛϛ | 222222222222222222222222222222222222 | - ~ |*2 + {1:~ }|*2 | ]]) end) @@ -181,134 +181,136 @@ describe('smoothscroll', function() endfunc ]]) screen:expect([[ - 1 one word word word word word word wo| + {8: 1 }one word word word word word word wo| rd word word word word word word word wo| rd word word word word word | - 2 two long word long word long word lo| + {8: 2 }two long word long word long word lo| ng word long word long word long word | - 3 ^line | - 4 line | - 5 line | - ~ |*3 + {8: 3 }^line | + {8: 4 }line | + {8: 5 }line | + {1:~ }|*3 | ]]) feed('<C-E>') screen:expect([[ - <<<word word word word word word word wo| + {1:<<<}word word word word word word word wo| rd word word word word word | - 2 two long word long word long word lo| + {8: 2 }two long word long word long word lo| ng word long word long word long word | - 3 ^line | - 4 line | - 5 line | - ~ |*4 + {8: 3 }^line | + {8: 4 }line | + {8: 5 }line | + {1:~ }|*4 | ]]) feed('<C-E>') screen:expect([[ - <<<word word word word word | - 2 two long word long word long word lo| + {1:<<<}word word word word word | + {8: 2 }two long word long word long word lo| ng word long word long word long word | - 3 ^line | - 4 line | - 5 line | - ~ |*5 + {8: 3 }^line | + {8: 4 }line | + {8: 5 }line | + {1:~ }|*5 | ]]) exec('set cpo-=n') screen:expect([[ - <<< d word word word word word word | - 2 two long word long word long word lo| - ng word long word long word long wor| - d | - 3 ^line | - 4 line | - 5 line | - ~ |*4 + {1:<<<}{8: }d word word word word word word | + {8: 2 }two long word long word long word lo| + {8: }ng word long word long word long wor| + {8: }d | + {8: 3 }^line | + {8: 4 }line | + {8: 5 }line | + {1:~ }|*4 | ]]) feed('<C-Y>') screen:expect([[ - <<< rd word word word word word word wor| - d word word word word word word | - 2 two long word long word long word lo| - ng word long word long word long wor| - d | - 3 ^line | - 4 line | - 5 line | - ~ |*3 + {1:<<<}{8: }rd word word word word word word wor| + {8: }d word word word word word word | + {8: 2 }two long word long word long word lo| + {8: }ng word long word long word long wor| + {8: }d | + {8: 3 }^line | + {8: 4 }line | + {8: 5 }line | + {1:~ }|*3 | ]]) feed('<C-Y>') screen:expect([[ - 1 one word word word word word word wo| - rd word word word word word word wor| - d word word word word word word | - 2 two long word long word long word lo| - ng word long word long word long wor| - d | - 3 ^line | - 4 line | - 5 line | - ~ |*2 + {8: 1 }one word word word word word word wo| + {8: }rd word word word word word word wor| + {8: }d word word word word word word | + {8: 2 }two long word long word long word lo| + {8: }ng word long word long word long wor| + {8: }d | + {8: 3 }^line | + {8: 4 }line | + {8: 5 }line | + {1:~ }|*2 | ]]) exec('botright split') feed('gg') screen:expect([[ - 1 one word word word word word word wo| - rd word word word word word word wor| - d word word word word word word | - 2 two long word long word long word@@@| - [No Name] [+] | - 1 ^one word word word word word word wo| - rd word word word word word word wor| - d word word word word word word | - 2 two long word long word long word lo| - ng word long word long word long @@@| - [No Name] [+] | + {8: 1 }one word word word word word word wo| + {8: }rd word word word word word word wor| + {8: }d word word word word word word | + {8: 2 }two long word long word long word{1:@@@}| + {2:[No Name] [+] }| + {8: 1 }^one word word word word word word wo| + {8: }rd word word word word word word wor| + {8: }d word word word word word word | + {8: 2 }two long word long word long word lo| + {8: }ng word long word long word long {1:@@@}| + {3:[No Name] [+] }| | ]]) + feed('<C-E>') screen:expect([[ - 1 one word word word word word word wo| - rd word word word word word word wor| - d word word word word word word | - 2 two long word long word long word@@@| - [No Name] [+] | - <<< rd word word word word word word wor| - d word word word word word word^ | - 2 two long word long word long word lo| - ng word long word long word long wor| - d | - [No Name] [+] | + {8: 1 }one word word word word word word wo| + {8: }rd word word word word word word wor| + {8: }d word word word word word word | + {8: 2 }two long word long word long word{1:@@@}| + {2:[No Name] [+] }| + {1:<<<}{8: }rd word word word word word word wor| + {8: }d word word word word word word^ | + {8: 2 }two long word long word long word lo| + {8: }ng word long word long word long wor| + {8: }d | + {3:[No Name] [+] }| | ]]) + feed('<C-E>') screen:expect([[ - 1 one word word word word word word wo| - rd word word word word word word wor| - d word word word word word word | - 2 two long word long word long word@@@| - [No Name] [+] | - <<< d word word word word word word^ | - 2 two long word long word long word lo| - ng word long word long word long wor| - d | - 3 line | - [No Name] [+] | + {8: 1 }one word word word word word word wo| + {8: }rd word word word word word word wor| + {8: }d word word word word word word | + {8: 2 }two long word long word long word{1:@@@}| + {2:[No Name] [+] }| + {1:<<<}{8: }d word word word word word word^ | + {8: 2 }two long word long word long word lo| + {8: }ng word long word long word long wor| + {8: }d | + {8: 3 }line | + {3:[No Name] [+] }| | ]]) exec('close') exec('call DoRel()') screen:expect([[ - 2<<<^ong text very long text very long te| - xt very long text very long text ver| - y long text very long text very long| - text very long text very long text | - 1 three | - ~ |*6 + {8:2}{1:<<<}^ong text very long text very long te| + {8: }xt very long text very long text ver| + {8: }y long text very long text very long| + {8: } text very long text very long text | + {8: 1 }three | + {1:~ }|*6 --No lines in buffer-- | ]]) end) @@ -323,22 +325,22 @@ describe('smoothscroll', function() exe "normal 2Gzt\<C-E>" ]]) screen:expect([[ - <<<t very long text very long text very | + {1:<<<}t very long text very long text very | ^long text very long text very long text | very long text very long text very long | - text very long text- | + text very long text{1:-} | three | - ~ |*2 + {1:~ }|*2 | ]]) exec('set listchars+=precedes:#') screen:expect([[ - #ext very long text very long text very | + {1:#}ext very long text very long text very | ^long text very long text very long text | very long text very long text very long | - text very long text- | + text very long text{1:-} | three | - ~ |*2 + {1:~ }|*2 | ]]) end) @@ -356,13 +358,14 @@ describe('smoothscroll', function() set smoothscroll diffthis ]]) + screen:expect([[ - - ^just some text here | - ~ |*2 - [No Name] [+] | - - just some text here | - ~ | - [No Name] [+] | + {7:- }^just some text here | + {1:~ }|*2 + {3:[No Name] [+] }| + {7:- }just some text here | + {1:~ }| + {2:[No Name] [+] }| | ]]) feed('<C-Y>') @@ -380,7 +383,7 @@ describe('smoothscroll', function() :3 ]]) screen:expect([[ - <<<h some text with some text | + {1:<<<}h some text with some text | Line with some text with some text with | some text with some text with some text | with some text with some text | @@ -401,7 +404,7 @@ describe('smoothscroll', function() -- moving cursor up right after the <<< marker - no need to show whole line feed('2gj3l2k') screen:expect([[ - <<<^h some text with some text | + {1:<<<}^h some text with some text | Line with some text with some text with | some text with some text with some text | with some text with some text | @@ -419,7 +422,7 @@ describe('smoothscroll', function() Line with some text with some text with | some text with some text with some text | with some text with some text | - @ | + {1:@ }| | ]]) end) @@ -443,7 +446,7 @@ describe('smoothscroll', function() ]]) feed('<C-E>') screen:expect([[ - <<<th lot^s of text with lots of text wit| + {1:<<<}th lot^s of text with lots of text wit| h lots of text with lots of text with lo| ts of text with lots of text with lots o| f text with lots of text with lots of te| @@ -452,7 +455,7 @@ describe('smoothscroll', function() ]]) feed('5<C-E>') screen:expect([[ - <<< lots ^of text with lots of text with | + {1:<<<} lots ^of text with lots of text with | lots of text with lots of text with lots| of text with lots of text with lots of | text with lots of text with lots of text| @@ -462,7 +465,7 @@ describe('smoothscroll', function() -- scrolling down, cursor moves screen line up feed('5<C-Y>') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of text with lots of text with lo| ts of text with lots of text with lots o| f text with lots of text with lots of te| @@ -482,7 +485,7 @@ describe('smoothscroll', function() exec('set scrolloff=1') feed('10|<C-E>') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of^ text with lots of text with lo| ts of text with lots of text with lots o| f text with lots of text with lots of te| @@ -492,7 +495,7 @@ describe('smoothscroll', function() -- 'scrolloff' set to 1, scrolling down, cursor moves screen line up feed('<C-E>gjgj<C-Y>') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of text with lots of text with lo| ts of text with lots of text with lots o| f text wi^th lots of text with lots of te| @@ -503,7 +506,7 @@ describe('smoothscroll', function() exec('set scrolloff=2') feed('10|<C-E>') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of text with lots of text with lo| ts of tex^t with lots of text with lots o| f text with lots of text with lots of te| @@ -518,7 +521,7 @@ describe('smoothscroll', function() exec('set scrolloff=0') feed('0j') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of text with lots of text with lo| ts of text with lots of text with lots o| f text with lots of text end | @@ -529,20 +532,20 @@ describe('smoothscroll', function() feed('zt') screen:expect([[ ^four | - ~ |*4 + {1:~ }|*4 | ]]) feed('zz') screen:expect([[ - <<<of text with lots of text with lots o| + {1:<<<}of text with lots of text with lots o| f text with lots of text end | ^four | - ~ |*2 + {1:~ }|*2 | ]]) feed('zb') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of text with lots of text with lo| ts of text with lots of text with lots o| f text with lots of text end | @@ -567,7 +570,7 @@ describe('smoothscroll', function() -- screen. feed('3Gzt<C-E>j') screen:expect([[ - <<<th lots of text with lots of text wit| + {1:<<<}th lots of text with lots of text wit| h lots of text with lots of text with lo| ts of text with lots of text with lots o| f text with lots of text end | @@ -588,16 +591,16 @@ describe('smoothscroll', function() lots of text with lots of text with lot| s of text with lots of text with lots of| text | - ~ | + {1:~ }| | ]] screen:expect(s1) feed('<C-E>') screen:expect([[ - <<<ts of text with lots of text with lot| + {1:<<<}ts of text with lots of text with lot| ^s of text with lots of text with lots of| text | - ~ |*2 + {1:~ }|*2 | ]]) feed('0') @@ -612,20 +615,20 @@ describe('smoothscroll', function() exec('set smoothscroll scrolloff=0 showbreak=+++\\ ') local s1 = [[ ^with lots of text in one line with lots | - +++ of text in one line with lots of tex| - +++ t in one line with lots of text in o| - +++ ne line with lots of text in one lin| - +++ e with lots of text in one line | + {1:+++ }of text in one line with lots of tex| + {1:+++ }t in one line with lots of text in o| + {1:+++ }ne line with lots of text in one lin| + {1:+++ }e with lots of text in one line | | ]] screen:expect(s1) feed('<C-E>') screen:expect([[ - +++ ^of text in one line with lots of tex| - +++ t in one line with lots of text in o| - +++ ne line with lots of text in one lin| - +++ e with lots of text in one line | - ~ | + {1:+++ }^of text in one line with lots of tex| + {1:+++ }t in one line with lots of text in o| + {1:+++ }ne line with lots of text in one lin| + {1:+++ }e with lots of text in one line | + {1:~ }| | ]]) feed('0') @@ -642,13 +645,13 @@ describe('smoothscroll', function() screen:expect([[ ^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| 口口口口口口口口口口 | - ~ |*3 + {1:~ }|*3 | ]]) feed('<C-E>') screen:expect([[ - <<< 口口口口口口口^口 | - ~ |*4 + {1:<<<} 口口口口口口口^口 | + {1:~ }|*4 | ]]) end) @@ -694,7 +697,7 @@ describe('smoothscroll', function() ]=]) feed('<C-E>gjgk') screen:expect([[ - <<<lots of text in one line^ | + {1:<<<}lots of text in one line^ | line two | line three | line four | @@ -717,7 +720,7 @@ describe('smoothscroll', function() call search('xxx') ]=]) screen:expect([[ - <<<_____________________________________| + {1:<<<}_____________________________________| ________________________________________| ______________________________________^xx| x______________________________________x| @@ -744,7 +747,7 @@ describe('smoothscroll', function() feed('<C-B>G') -- cursor is not placed below window screen:expect([[ - <<<aaaaaaaaaaaaaaaaa | + {1:<<<}aaaaaaaaaaaaaaaaa | |*7 ^ | | @@ -901,15 +904,15 @@ describe('smoothscroll', function() ]]) screen:expect([[ | - [No Name] | + {2:[No Name] }| line1 | line2 | ^line3line3line3line3line3line3line3line3| line3line3line3line3line3line3line3line3| line3line3line3line3 | line4 | - ~ |*2 - [No Name] [+] | + {1:~ }|*2 + {3:[No Name] [+] }| | ]]) end) @@ -952,7 +955,7 @@ describe('smoothscroll', function() ]]) feed('<C-E>') screen:expect([[ - <<<e text with some text with some text with some text | + {1:<<<}e text with some text with some text with some text | virt_below1 | virt_above1 | ^Line with some text with some text with some text with | @@ -977,7 +980,7 @@ describe('smoothscroll', function() some text with some text with some text with some text | virt_below2 | virt_above2 | - Line with some text with some text with some text wi@@@| + Line with some text with some text with some text wi{1:@@@}| | ]]) feed('<C-E>') @@ -992,12 +995,12 @@ describe('smoothscroll', function() ]]) feed('<C-E>') screen:expect([[ - <<<e text with some text with some text with some tex^t | + {1:<<<}e text with some text with some text with some tex^t | virt_below2 | virt_above2 | Line with some text with some text with some text with | some text with some text with some text with some text | - ~ | + {1:~ }| | ]]) end) @@ -1010,65 +1013,73 @@ describe('smoothscroll', function() ]]) feed('Go123456789<CR>') screen:expect([[ - <<<ery long line ...A very long line ...| + {1:<<<}ery long line ...A very long line ...| A very long line ...A very long line ...|*5 123456789 | ^ | - -- INSERT -- | + {5:-- INSERT --} | ]]) end) it('<<< marker shows with tabline, winbar and splits', function() screen:try_resize(40, 12) + screen:set_default_attr_ids({ + [1] = { foreground = Screen.colors.Blue1, bold = true }, + [2] = { reverse = true }, + [3] = { bold = true, reverse = true }, + [4] = { background = Screen.colors.LightMagenta }, + [5] = { bold = true }, + [31] = { foreground = Screen.colors.Fuchsia, bold = true }, + }) exec([[ call setline(1, ['Line' .. (' with some text'->repeat(7))]->repeat(7)) set smoothscroll scrolloff=0 norm sj ]]) screen:expect([[ - <<<e text with some text with some text | + {1:<<<}e text with some text with some text | with some text with some text | Line with some text with some text with | some text with some text with some text | with some text with some text | - [No Name] [+] | - <<<e text with some text with some text | + {2:[No Name] [+] }| + {1:<<<}e text with some text with some text | ^with some text with some text | Line with some text with some text with | - some text with some text with some te@@@| - [No Name] [+] | + some text with some text with some te{1:@@@}| + {3:[No Name] [+] }| | ]]) exec('set showtabline=2') feed('<C-E>') screen:expect([[ - 2+ [No Name] | - <<<e text with some text with some text | + {5: }{31:2}{5:+ [No Name] }{2: }| + {1:<<<}e text with some text with some text | with some text with some text | Line with some text with some text with | some text with some text with some text | with some text with some text | - [No Name] [+] | - <<<e text with some text with some text | + {2:[No Name] [+] }| + {1:<<<}e text with some text with some text | ^with some text with some text | - Line with some text with some text wi@@@| - [No Name] [+] | + Line with some text with some text wi{1:@@@}| + {3:[No Name] [+] }| | ]]) exec('set winbar=winbar') feed('<C-w>k<C-E>') screen:expect([[ - 2+ [No Name] | - winbar | - <<<e text with some text with some text | + {5: }{31:2}{5:+ [No Name] }{2: }| + {5:winbar }| + {1:<<<}e text with some text with some text | ^with some text with some text | Line with some text with some text with | - some text with some text with some te@@@| - [No Name] [+] | - winbar | - <<<e text with some text with some text | + some text with some text with some te{1:@@@}| + {3:[No Name] [+] }| + {5:winbar }| + {1:<<<}e text with some text with some text | with some text with some text | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) end) diff --git a/test/functional/legacy/window_cmd_spec.lua b/test/functional/legacy/window_cmd_spec.lua index 7fe4ec8eb6..3cd3a69239 100644 --- a/test/functional/legacy/window_cmd_spec.lua +++ b/test/functional/legacy/window_cmd_spec.lua @@ -65,10 +65,10 @@ describe('splitkeep', function() 99 | ^100 | 101 | - [No Name] [+] | + {3:[No Name] [+] }| 5 | 6 | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) @@ -77,10 +77,10 @@ describe('splitkeep', function() 100 | ^101 | 102 | - [No Name] [+] | + {3:[No Name] [+] }| 5 | 6 | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) @@ -90,10 +90,10 @@ describe('splitkeep', function() 198 | 199 | ^200 | - [No Name] [+] | + {3:[No Name] [+] }| 5 | 6 | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) end) @@ -135,13 +135,13 @@ describe('splitkeep', function() 3 | 4 | 5 | - [No Name] [+] | + {2:[No Name] [+] }| ^7 | 8 | 9 | 10 | 11 | - [No Name] [+] | + {3:[No Name] [+] }| | ]]) feed(':quit<CR>Ht') @@ -152,13 +152,13 @@ describe('splitkeep', function() 3 | 4 | 5 | - [No Name] [+] | + {3:[No Name] [+] }| 7 | 8 | 9 | 10 | 11 | - [No Name] [+] | + {2:[No Name] [+] }| :quit | ]]) feed(':set sb<CR>:quit<CR>Gj') @@ -168,14 +168,14 @@ describe('splitkeep', function() 3 | 4 | ^5 | - [No Name] [+] | + {3:[No Name] [+] }| 7 | 8 | 9 | 10 | 11 | 12 | - [No Name] [+] | + {2:[No Name] [+] }| :quit | ]]) feed(':quit<CR>Gt') @@ -185,14 +185,14 @@ describe('splitkeep', function() 3 | 4 | 5 | - [No Name] [+] | + {2:[No Name] [+] }| 7 | 8 | 9 | 10 | 11 | ^12 | - [No Name] [+] | + {3:[No Name] [+] }| :quit | ]]) end) @@ -213,70 +213,70 @@ describe('splitkeep', function() ]]) feed('L:wincmd s<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - 24 ^after fold | - [No Name] [+] | - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - [No Name] [+] | + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 24 }^after fold | + {3:[No Name] [+] }| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {2:[No Name] [+] }| :wincmd s | ]]) feed(':quit<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - 24 after fold | - 25 +-- 7 lines: int FuncName() {···················| - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - 49 ^+-- 7 lines: int FuncName() {···················| + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 24 }after fold | + {8: 25 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {8: 49 }{13:^+-- 7 lines: int FuncName() {···················}| :quit | ]]) feed('H:below split<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - [No Name] [+] | - 25 ^+-- 7 lines: int FuncName() {···················| - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - [No Name] [+] | + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {2:[No Name] [+] }| + {8: 25 }{13:^+-- 7 lines: int FuncName() {···················}| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {3:[No Name] [+] }| :below split | ]]) feed(':wincmd k<CR>:quit<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - 24 after fold | - 25 ^+-- 7 lines: int FuncName() {···················| - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - 49 +-- 7 lines: int FuncName() {···················| + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 24 }after fold | + {8: 25 }{13:^+-- 7 lines: int FuncName() {···················}| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {8: 49 }{13:+-- 7 lines: int FuncName() {···················}| :quit | ]]) end) @@ -296,13 +296,13 @@ describe('splitkeep', function() a | b | c | - ~ |*4 - [No Name] | + {1:~ }|*4 + {2:[No Name] }| ^a | b | c | - ~ | - [No Name] | + {1:~ }| + {3:[No Name] }| | ]]) end) @@ -317,16 +317,16 @@ describe('splitkeep', function() wincmd s ]]) screen:expect([[ - <<<e line with lots of text in one line | + {1:<<<}e line with lots of text in one line | with lots of text in one line with lots | of text in one line | - ~ | - [No Name] [+] | - <<<e line with lots of text in one line | + {1:~ }| + {2:[No Name] [+] }| + {1:<<<}e line with lots of text in one line | ^with lots of text in one line with lots | of text in one line | - ~ |*2 - [No Name] [+] | + {1:~ }|*2 + {3:[No Name] [+] }| | ]]) end) |