diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-04-08 08:32:45 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-04-09 09:09:41 +0200 |
commit | 3d44340cea08b06c27b87496e8149bc8a03766a2 (patch) | |
tree | 9abf9a57e3d0f3b54905c3b916e05da0e53b78c9 /test/functional/ui/diff_spec.lua | |
parent | c695caa7eeb16fdf5c5bf0c00644daf085f8a13a (diff) | |
download | rneovim-3d44340cea08b06c27b87496e8149bc8a03766a2.tar.gz rneovim-3d44340cea08b06c27b87496e8149bc8a03766a2.tar.bz2 rneovim-3d44340cea08b06c27b87496e8149bc8a03766a2.zip |
fix(tests): use more global highlight definitions
Diffstat (limited to 'test/functional/ui/diff_spec.lua')
-rw-r--r-- | test/functional/ui/diff_spec.lua | 1230 |
1 files changed, 590 insertions, 640 deletions
diff --git a/test/functional/ui/diff_spec.lua b/test/functional/ui/diff_spec.lua index 7aab061dc3..15b419c691 100644 --- a/test/functional/ui/diff_spec.lua +++ b/test/functional/ui/diff_spec.lua @@ -40,17 +40,6 @@ describe('Diff mode screen', function() screen = Screen.new(40, 16) screen:attach() - screen:set_default_attr_ids({ - [1] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray }, - [2] = { background = Screen.colors.LightCyan1, bold = true, foreground = Screen.colors.Blue1 }, - [3] = { reverse = true }, - [4] = { background = Screen.colors.LightBlue }, - [5] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey }, - [6] = { bold = true, foreground = Screen.colors.Blue1 }, - [7] = { bold = true, reverse = true }, - [8] = { bold = true, background = Screen.colors.Red }, - [9] = { background = Screen.colors.LightMagenta }, - }) end) it('Add a line in beginning of file 2', function() @@ -60,31 +49,31 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{23:------------------}│{7: }{22:0 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{23:------------------}│{7: }{22:0 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -96,31 +85,31 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{22:^0 }│{7: }{23:-----------------}| + {7: }1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{22:^0 }│{7: }{23:-----------------}| + {7: }1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -132,44 +121,44 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) screen:try_resize(40, 9) screen:expect([[ - {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 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -181,44 +170,44 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) screen:try_resize(40, 9) screen:expect([[ - {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 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -230,39 +219,39 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {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:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{23:------------------}│{7: }{22:4 }| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {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:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{23:------------------}│{7: }{22:4 }| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -274,39 +263,39 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {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:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{22:4 }│{7: }{23:-----------------}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {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:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{22:4 }│{7: }{23:-----------------}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -372,41 +361,41 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler<cr>') screen:expect([[ - {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 }| + {7: }^#include <stdio.h>│{7: }#include <stdio.h| + {7: } │{7: } | + {7: }{27:// Frobs foo heart}│{7: }{27:int fib(int n)}{4: }| + {7: }{22:int frobnitz(int f}│{7: }{23:-----------------}| + {7: }{ │{7: }{ | + {7: }{4: i}{27:nt i;}{4: }│{7: }{4: i}{27:f(n > 2)}{4: }| + {7: }{22: for(i = 0; i <}│{7: }{23:-----------------}| + {7: } { │{7: } { | + {7: }{4: }{27:printf("Yo}│{7: }{4: }{27:return fi}| + {7: }{22: printf("%d}│{7: }{23:-----------------}| + {7: } } │{7: } } | + {7: }{23:------------------}│{7: }{22: return 1; }| + {7: }} │{7: }} | + {7: } │{7: } | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) feed('G') screen:expect([[ - {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 }| + {7: }{23:------------------}│{7: }{22:int frobnitz(int }| + {7: }{ │{7: }{ | + {7: }{4: i}{27:f(n > 1)}{4: }│{7: }{4: i}{27:nt i;}{4: }| + {7: }{23:------------------}│{7: }{22: for(i = 0; i }| + {7: } { │{7: } { | + {7: }{4: }{27:return fac}│{7: }{4: }{27:printf("%}| + {7: } } │{7: } } | + {7: }{22: return 1; }│{7: }{23:-----------------}| + {7: }} │{7: }} | + {7: } │{7: } | + {7: }int main(int argc,│{7: }int main(int argc| + {7: }{ │{7: }{ | + {7: }{4: frobnitz(f}{27:act}{4:(}│{7: }{4: frobnitz(f}{27:ib}{4:(}| + {7: }^} │{7: }} | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) end) @@ -415,41 +404,41 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,algorithm:patience<cr>') screen:expect([[ - {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 }| + {7: }^#include <stdio.h>│{7: }#include <stdio.h| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22:int fib(int n) }| + {7: }{23:------------------}│{7: }{22:{ }| + {7: }{23:------------------}│{7: }{22: if(n > 2) }| + {7: }{23:------------------}│{7: }{22: { }| + {7: }{23:------------------}│{7: }{22: return fi}| + {7: }{23:------------------}│{7: }{22: } }| + {7: }{23:------------------}│{7: }{22: return 1; }| + {7: }{23:------------------}│{7: }{22:} }| + {7: }{23:------------------}│{7: }{22: }| + {7: }// Frobs foo heart│{7: }// Frobs foo hear| + {7: }int frobnitz(int f│{7: }int frobnitz(int | + {7: }{ │{7: }{ | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) feed('G') screen:expect([[ - {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 }| + {7: } │{7: } | + {7: }{22:int fact(int n) }│{7: }{23:-----------------}| + {7: }{22:{ }│{7: }{23:-----------------}| + {7: }{22: if(n > 1) }│{7: }{23:-----------------}| + {7: }{22: { }│{7: }{23:-----------------}| + {7: }{22: return fac}│{7: }{23:-----------------}| + {7: }{22: } }│{7: }{23:-----------------}| + {7: }{22: return 1; }│{7: }{23:-----------------}| + {7: }{22:} }│{7: }{23:-----------------}| + {7: }{22: }│{7: }{23:-----------------}| + {7: }int main(int argc,│{7: }int main(int argc| + {7: }{ │{7: }{ | + {7: }{4: frobnitz(f}{27:act}{4:(}│{7: }{4: frobnitz(f}{27:ib}{4:(}| + {7: }^} │{7: }} | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -458,41 +447,41 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,algorithm:histogram<cr>') screen:expect([[ - {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 }| + {7: }^#include <stdio.h>│{7: }#include <stdio.h| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22:int fib(int n) }| + {7: }{23:------------------}│{7: }{22:{ }| + {7: }{23:------------------}│{7: }{22: if(n > 2) }| + {7: }{23:------------------}│{7: }{22: { }| + {7: }{23:------------------}│{7: }{22: return fi}| + {7: }{23:------------------}│{7: }{22: } }| + {7: }{23:------------------}│{7: }{22: return 1; }| + {7: }{23:------------------}│{7: }{22:} }| + {7: }{23:------------------}│{7: }{22: }| + {7: }// Frobs foo heart│{7: }// Frobs foo hear| + {7: }int frobnitz(int f│{7: }int frobnitz(int | + {7: }{ │{7: }{ | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) feed('G') screen:expect([[ - {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 }| + {7: } │{7: } | + {7: }{22:int fact(int n) }│{7: }{23:-----------------}| + {7: }{22:{ }│{7: }{23:-----------------}| + {7: }{22: if(n > 1) }│{7: }{23:-----------------}| + {7: }{22: { }│{7: }{23:-----------------}| + {7: }{22: return fac}│{7: }{23:-----------------}| + {7: }{22: } }│{7: }{23:-----------------}| + {7: }{22: return 1; }│{7: }{23:-----------------}| + {7: }{22:} }│{7: }{23:-----------------}| + {7: }{22: }│{7: }{23:-----------------}| + {7: }int main(int argc,│{7: }int main(int argc| + {7: }{ │{7: }{ | + {7: }{4: frobnitz(f}{27:act}{4:(}│{7: }{4: frobnitz(f}{27:ib}{4:(}| + {7: }^} │{7: }} | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -525,17 +514,17 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler<cr>') screen:expect([[ - {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:~ }|*5 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^def finalize(value│{7: }def finalize(valu| + {7: } │{7: } | + {7: } values.each do |│{7: } values.each do | + {7: }{23:------------------}│{7: }{22: v.prepare }| + {7: }{23:------------------}│{7: }{22: end }| + {7: }{23:------------------}│{7: }{22: }| + {7: }{23:------------------}│{7: }{22: values.each do }| + {7: } v.finalize │{7: } v.finalize | + {7: } end │{7: } end | + {1:~ }│{1:~ }|*5 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) end) @@ -544,17 +533,17 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,indent-heuristic<cr>') screen:expect([[ - {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:~ }|*5 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^def finalize(value│{7: }def finalize(valu| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22: values.each do }| + {7: }{23:------------------}│{7: }{22: v.prepare }| + {7: }{23:------------------}│{7: }{22: end }| + {7: }{23:------------------}│{7: }{22: }| + {7: } values.each do |│{7: } values.each do | + {7: } v.finalize │{7: } v.finalize | + {7: } end │{7: } end | + {1:~ }│{1:~ }|*5 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -564,17 +553,17 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,indent-heuristic,algorithm:patience<cr>') feed(':<cr>') screen:expect([[ - {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:~ }|*5 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^def finalize(value│{7: }def finalize(valu| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22: values.each do }| + {7: }{23:------------------}│{7: }{22: v.prepare }| + {7: }{23:------------------}│{7: }{22: end }| + {7: }{23:------------------}│{7: }{22: }| + {7: } values.each do |│{7: } values.each do | + {7: } v.finalize │{7: } v.finalize | + {7: } end │{7: } end | + {1:~ }│{1:~ }|*5 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -587,17 +576,17 @@ int main(int argc, char **argv) feed(':set diffopt=filler<cr>') screen:expect([[ - {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| - {6:~ }│{6:~ }|*13 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 10 lines: 1···}│{7:+ }{13:+-- 10 lines: 1··}| + {1:~ }│{1:~ }|*13 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| - {6:~ }│{6:~ }|*13 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 10 lines: 1···}│{7:+ }{13:+-- 10 lines: 1··}| + {1:~ }│{1:~ }|*13 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -609,17 +598,17 @@ int main(int argc, char **argv) feed(':set diffopt=filler<cr>') screen:expect([[ - {1:- }^ │{1:- } | - {6:~ }│{6:~ }|*13 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:- }^ │{7:- } | + {1:~ }│{1:~ }|*13 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:- }^ │{1:- } | - {6:~ }│{6:~ }|*13 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:- }^ │{7:- } | + {1:~ }│{1:~ }|*13 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -631,21 +620,21 @@ int main(int argc, char **argv) feed(':set diffopt=filler,icase<cr>') screen:expect([[ - {1: }^a │{1: }A | - {1: }b │{1: }b | - {1: }{9:cd }│{1: }{9:cD}{8:e}{9: }| - {6:~ }│{6:~ }|*11 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }A | + {7: }b │{7: }b | + {7: }{4:cd }│{7: }{4:cD}{27:e}{4: }| + {1:~ }│{1:~ }|*11 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler,icase | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }^a │{1: }A | - {1: }b │{1: }b | - {1: }{9:cd }│{1: }{9:cD}{8:e}{9: }| - {6:~ }│{6:~ }|*11 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }A | + {7: }b │{7: }b | + {7: }{4:cd }│{7: }{4:cD}{27:e}{4: }| + {1:~ }│{1:~ }|*11 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -664,16 +653,16 @@ int main(int argc, char **argv) reread() feed(':set diffopt=filler,iwhite<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^int main() │{7: }int main() | + {7: }{ │{7: }{ | + {7: }{23:------------------}│{7: }{22: if (0) }| + {7: }{23:------------------}│{7: }{22: { }| + {7: } printf("Hello, │{7: } printf("Hel| + {7: } return 0; │{7: } return 0; | + {7: }{23:------------------}│{7: }{22: } }| + {7: }} │{7: }} | + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler,iwhite | ]]) end) @@ -682,16 +671,16 @@ int main(int argc, char **argv) reread() feed(':set diffopt=filler,iwhite,internal<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^int main() │{7: }int main() | + {7: }{ │{7: }{ | + {7: }{23:------------------}│{7: }{22: if (0) }| + {7: }{23:------------------}│{7: }{22: { }| + {7: } printf("Hello, │{7: } printf("Hel| + {7: } return 0; │{7: } return 0; | + {7: }{23:------------------}│{7: }{22: } }| + {7: }} │{7: }} | + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler,iwhite,internal | ]]) end) @@ -708,14 +697,14 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,iblank<cr>') screen:expect([[ - {1: }^a │{1: }a | - {1: }{4: }│{1: }{2:-----------------}|*2 - {1: }cd │{1: }cd | - {1: }ef │{1: } | - {1: }{8:xxx}{9: }│{1: }ef | - {6:~ }│{1: }{8:yyy}{9: }| - {6:~ }│{6:~ }|*7 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }a | + {7: }{22: }│{7: }{23:-----------------}|*2 + {7: }cd │{7: }cd | + {7: }ef │{7: } | + {7: }{27:xxx}{4: }│{7: }ef | + {1:~ }│{7: }{27:yyy}{4: }| + {1:~ }│{1:~ }|*7 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler,iblank | ]]) end) @@ -725,14 +714,14 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iblank,iwhite<cr>') feed(':<cr>') screen:expect([[ - {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:~ }|*8 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }a | + {7: } │{7: }cd | + {7: } │{7: } | + {7: }cd │{7: }ef | + {7: }ef │{7: }{27:yyy}{4: }| + {7: }{27:xxx}{4: }│{1:~ }| + {1:~ }│{1:~ }|*8 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -742,14 +731,14 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iblank,iwhiteall<cr>') feed(':<cr>') screen:expect([[ - {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:~ }|*8 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }a | + {7: } │{7: }cd | + {7: } │{7: } | + {7: }cd │{7: }ef | + {7: }ef │{7: }{27:yyy}{4: }| + {7: }{27:xxx}{4: }│{1:~ }| + {1:~ }│{1:~ }|*8 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -759,14 +748,14 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iblank,iwhiteeol<cr>') feed(':<cr>') screen:expect([[ - {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:~ }|*8 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }a | + {7: } │{7: }cd | + {7: } │{7: } | + {7: }cd │{7: }ef | + {7: }ef │{7: }{27:yyy}{4: }| + {7: }{27:xxx}{4: }│{1:~ }| + {1:~ }│{1:~ }|*8 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -784,16 +773,16 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iwhiteeol<cr>') feed(':<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }a | + {7: }x │{7: }x | + {7: }{4:cd }│{7: }{4:c}{27: }{4:d }| + {7: }{4:ef }│{7: }{27: }{4:ef }| + {7: }{4:xx }{27: }{4:xx }│{7: }{4:xx xx }| + {7: }foo │{7: }foo | + {7: }{23:------------------}│{7: }{22: }| + {7: }bar │{7: }bar | + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -803,16 +792,16 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,iwhiteall<cr>') feed(':<cr>') screen:expect([[ - {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 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^a │{7: }a | + {7: }x │{7: }x | + {7: }cd │{7: }c d | + {7: }ef │{7: } ef | + {7: }xx xx │{7: }xx xx | + {7: }foo │{7: }foo | + {7: }{23:------------------}│{7: }{22: }| + {7: }bar │{7: }bar | + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -883,32 +872,32 @@ int main(int argc, char **argv) feed('<C-W><C-W>jjjj') screen:expect([[ - {1: }line 1 │{1: }line 1 | - {1: }line 2 │{1: }line 2 | - {1: }line 3 │{1: }line 3 | - {1: }line 4 │{1: }line 4 | - {1: } │{1: }^ | - {1: }{2:-----------------}│{1: }{4:Lorem }| - {1: }{2:-----------------}│{1: }{4:ipsum }| - {1: }{2:-----------------}│{1: }{4:dolor }| - {1: }{2:-----------------}│{1: }{4:sit }| - {1: }{2:-----------------}│{1: }{4:amet, }| - {3:<nal-diff-screen-1 }{7:<al-diff-screen-1.2 }| + {7: }line 1 │{7: }line 1 | + {7: }line 2 │{7: }line 2 | + {7: }line 3 │{7: }line 3 | + {7: }line 4 │{7: }line 4 | + {7: } │{7: }^ | + {7: }{23:-----------------}│{7: }{22:Lorem }| + {7: }{23:-----------------}│{7: }{22:ipsum }| + {7: }{23:-----------------}│{7: }{22:dolor }| + {7: }{23:-----------------}│{7: }{22:sit }| + {7: }{23:-----------------}│{7: }{22:amet, }| + {2:<nal-diff-screen-1 }{3:<al-diff-screen-1.2 }| :e | ]]) feed('j') screen:expect([[ - {1: }line 1 │{1: }line 1 | - {1: }line 2 │{1: }line 2 | - {1: }line 3 │{1: }line 3 | - {1: }line 4 │{1: }line 4 | - {1: } │{1: } | - {1: }{2:-----------------}│{1: }{4:^Lorem }| - {1: }{2:-----------------}│{1: }{4:ipsum }| - {1: }{2:-----------------}│{1: }{4:dolor }| - {1: }{2:-----------------}│{1: }{4:sit }| - {1: }{2:-----------------}│{1: }{4:amet, }| - {3:<nal-diff-screen-1 }{7:<al-diff-screen-1.2 }| + {7: }line 1 │{7: }line 1 | + {7: }line 2 │{7: }line 2 | + {7: }line 3 │{7: }line 3 | + {7: }line 4 │{7: }line 4 | + {7: } │{7: } | + {7: }{23:-----------------}│{7: }{22:^Lorem }| + {7: }{23:-----------------}│{7: }{22:ipsum }| + {7: }{23:-----------------}│{7: }{22:dolor }| + {7: }{23:-----------------}│{7: }{22:sit }| + {7: }{23:-----------------}│{7: }{22:amet, }| + {2:<nal-diff-screen-1 }{3:<al-diff-screen-1.2 }| :e | ]]) end) @@ -942,38 +931,38 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler<cr>') screen:expect([[ - {1: }^if __name__ == "__│{1: }if __name__ == "_| - {1: } import sys │{1: } import sys | - {1: }{9: }{8:app = QWidgets}│{1: }{9: }{8:comment these}| - {1: }{9: }{8:MainWindow = Q}│{1: }{9: }{8:#app = QWidge}| - {1: }{9: }{8:ui = UI_}{9:MainWi}│{1: }{9: }{8:#MainWindow =}| - {1: }{2:------------------}│{1: }{4: add a complet}| - {1: }{2:------------------}│{1: }{4: #ui = UI_Main}| - {1: }{2:------------------}│{1: }{4: add another n}| - {1: } ui.setupUI(Mai│{1: } ui.setupUI(Ma| - {1: } MainWindow.sho│{1: } MainWindow.sh| - {1: } sys.exit(app.e│{1: } sys.exit(app.| - {6:~ }│{6:~ }|*3 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^if __name__ == "__│{7: }if __name__ == "_| + {7: } import sys │{7: } import sys | + {7: }{4: }{27:app = QWidgets}│{7: }{4: }{27:comment these}| + {7: }{4: }{27:MainWindow = Q}│{7: }{4: }{27:#app = QWidge}| + {7: }{4: }{27:ui = UI_}{4:MainWi}│{7: }{4: }{27:#MainWindow =}| + {7: }{23:------------------}│{7: }{22: add a complet}| + {7: }{23:------------------}│{7: }{22: #ui = UI_Main}| + {7: }{23:------------------}│{7: }{22: add another n}| + {7: } ui.setupUI(Mai│{7: } ui.setupUI(Ma| + {7: } MainWindow.sho│{7: } MainWindow.sh| + {7: } sys.exit(app.e│{7: } sys.exit(app.| + {1:~ }│{1:~ }|*3 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) feed('G') feed(':set diffopt+=linematch:20<cr>') screen:expect([[ - {1: }if __name__ == "__│{1: }if __name__ == "_| - {1: } import sys │{1: } import sys | - {1: }{2:------------------}│{1: }{4: comment these}| - {1: }{9: app = QWidgets}│{1: }{9: }{8:#}{9:app = QWidge}| - {1: }{9: MainWindow = Q}│{1: }{9: }{8:#}{9:MainWindow =}| - {1: }{2:------------------}│{1: }{4: add a complet}| - {1: }{9: ui = UI_MainWi}│{1: }{9: }{8:#}{9:ui = UI_Main}| - {1: }{2:------------------}│{1: }{4: add another n}| - {1: } ui.setupUI(Mai│{1: } ui.setupUI(Ma| - {1: } MainWindow.sho│{1: } MainWindow.sh| - {1: } ^sys.exit(app.e│{1: } sys.exit(app.| - {6:~ }│{6:~ }|*3 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }if __name__ == "__│{7: }if __name__ == "_| + {7: } import sys │{7: } import sys | + {7: }{23:------------------}│{7: }{22: comment these}| + {7: }{4: app = QWidgets}│{7: }{4: }{27:#}{4:app = QWidge}| + {7: }{4: MainWindow = Q}│{7: }{4: }{27:#}{4:MainWindow =}| + {7: }{23:------------------}│{7: }{22: add a complet}| + {7: }{4: ui = UI_MainWi}│{7: }{4: }{27:#}{4:ui = UI_Main}| + {7: }{23:------------------}│{7: }{22: add another n}| + {7: } ui.setupUI(Mai│{7: } ui.setupUI(Ma| + {7: } MainWindow.sho│{7: } MainWindow.sh| + {7: } ^sys.exit(app.e│{7: } sys.exit(app.| + {1:~ }│{1:~ }|*3 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=linematch:20 | ]]) end) @@ -993,20 +982,20 @@ ccca]] reread() feed(':set diffopt=internal,filler,linematch:20<cr>') screen:expect([[ - {1: }^DDD │{1: }DDD | - {1: }{2:------------------}│{1: }{4:AAA }| - {1: }{8:_a}{9:a }│{1: }{8:ccc}{9:a }| - {6:~ }│{6:~ }|*11 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^DDD │{7: }DDD | + {7: }{23:------------------}│{7: }{22:AAA }| + {7: }{27:_a}{4:a }│{7: }{27:ccc}{4:a }| + {1:~ }│{1:~ }|*11 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) feed(':set diffopt+=icase<cr>') screen:expect([[ - {1: }^DDD │{1: }DDD | - {1: }{8:_}{9:aa }│{1: }{8:A}{9:AA }| - {1: }{2:------------------}│{1: }{4:ccca }| - {6:~ }│{6:~ }|*11 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^DDD │{7: }DDD | + {7: }{27:_}{4:aa }│{7: }{27:A}{4:AA }| + {7: }{23:------------------}│{7: }{22:ccca }| + {1:~ }│{1:~ }|*11 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=icase | ]]) end) @@ -1027,22 +1016,22 @@ AAAB]] feed(':set diffopt=internal,filler,linematch:20<cr>') screen:expect { grid = [[ - {1: }^BB │{1: }BB | - {1: }{9: AA}{8:A}{9: }│{1: }{9: AA}{8:B}{9: }| - {1: }{2:------------------}│{1: }{4:AAAB }| - {6:~ }│{6:~ }|*11 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^BB │{7: }BB | + {7: }{4: AA}{27:A}{4: }│{7: }{4: AA}{27:B}{4: }| + {7: }{23:------------------}│{7: }{22:AAAB }| + {1:~ }│{1:~ }|*11 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]], } feed(':set diffopt+=iwhiteall<cr>') screen:expect { grid = [[ - {1: }^BB │{1: }BB | - {1: }{2:------------------}│{1: }{4: AAB }| - {1: }{9: AAA }│{1: }{9:AAA}{8:B}{9: }| - {6:~ }│{6:~ }|*11 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^BB │{7: }BB | + {7: }{23:------------------}│{7: }{22: AAB }| + {7: }{4: AAA }│{7: }{4:AAA}{27:B}{4: }| + {1:~ }│{1:~ }|*11 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=iwhiteall | ]], } @@ -1057,16 +1046,16 @@ AAAB]] command('botright new') screen:expect { grid = [[ - {1: }aaa │{1: }aaa | - {1: }bbb │{1: }bbb | - {1: }ccc │{1: }ccc | - {1: } │{1: } | - {1: }{8:xx}{9: }│{1: }{8:yy}{9: }| - {6:~ }│{6:~ }| - {3:<onal-diff-screen-1 <l-diff-screen-1.2 }| + {7: }aaa │{7: }aaa | + {7: }bbb │{7: }bbb | + {7: }ccc │{7: }ccc | + {7: } │{7: } | + {7: }{27:xx}{4: }│{7: }{27:yy}{4: }| + {1:~ }│{1:~ }| + {2:<onal-diff-screen-1 <l-diff-screen-1.2 }| ^ | - {6:~ }|*6 - {7:[No Name] }| + {1:~ }|*6 + {3:[No Name] }| :e | ]], } @@ -1074,16 +1063,16 @@ AAAB]] api.nvim_buf_set_lines(buf, 1, 2, true, { 'BBB' }) screen:expect { grid = [[ - {1: }aaa │{1: }aaa | - {1: }{8:BBB}{9: }│{1: }{8:bbb}{9: }| - {1: }ccc │{1: }ccc | - {1: } │{1: } | - {1: }{8:xx}{9: }│{1: }{8:yy}{9: }| - {6:~ }│{6:~ }| - {3:<-diff-screen-1 [+] <l-diff-screen-1.2 }| + {7: }aaa │{7: }aaa | + {7: }{27:BBB}{4: }│{7: }{27:bbb}{4: }| + {7: }ccc │{7: }ccc | + {7: } │{7: } | + {7: }{27:xx}{4: }│{7: }{27:yy}{4: }| + {1:~ }│{1:~ }| + {2:<-diff-screen-1 [+] <l-diff-screen-1.2 }| ^ | - {6:~ }|*6 - {7:[No Name] }| + {1:~ }|*6 + {3:[No Name] }| :e | ]], } @@ -1097,20 +1086,20 @@ AAAB]] command('botright split | diffoff') screen:expect { grid = [[ - {1: }aaa │{1: }aaa | - {1: }bbb │{1: }bbb | - {1: }ccc │{1: }ccc | - {1: } │{1: } | - {1: }{8:xx}{9: }│{1: }{8:yy}{9: }| - {6:~ }│{6:~ }| - {3:<onal-diff-screen-1 <l-diff-screen-1.2 }| + {7: }aaa │{7: }aaa | + {7: }bbb │{7: }bbb | + {7: }ccc │{7: }ccc | + {7: } │{7: } | + {7: }{27:xx}{4: }│{7: }{27:yy}{4: }| + {1:~ }│{1:~ }| + {2:<onal-diff-screen-1 <l-diff-screen-1.2 }| ^aaa | bbb | ccc | | xx | - {6:~ }|*2 - {7:Xtest-functional-diff-screen-1 }| + {1:~ }|*2 + {3:Xtest-functional-diff-screen-1 }| :e | ]], } @@ -1118,20 +1107,20 @@ AAAB]] api.nvim_buf_set_lines(buf, 1, 2, true, { 'BBB' }) screen:expect { grid = [[ - {1: }aaa │{1: }aaa | - {1: }{8:BBB}{9: }│{1: }{8:bbb}{9: }| - {1: }ccc │{1: }ccc | - {1: } │{1: } | - {1: }{8:xx}{9: }│{1: }{8:yy}{9: }| - {6:~ }│{6:~ }| - {3:<-diff-screen-1 [+] <l-diff-screen-1.2 }| + {7: }aaa │{7: }aaa | + {7: }{27:BBB}{4: }│{7: }{27:bbb}{4: }| + {7: }ccc │{7: }ccc | + {7: } │{7: } | + {7: }{27:xx}{4: }│{7: }{27:yy}{4: }| + {1:~ }│{1:~ }| + {2:<-diff-screen-1 [+] <l-diff-screen-1.2 }| ^aaa | BBB | ccc | | xx | - {6:~ }|*2 - {7:Xtest-functional-diff-screen-1 [+] }| + {1:~ }|*2 + {3:Xtest-functional-diff-screen-1 [+] }| :e | ]], } @@ -1220,19 +1209,6 @@ end) it('diff updates line numbers below filler lines', function() local screen = Screen.new(40, 14) screen:attach() - screen:set_default_attr_ids({ - [1] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray }, - [2] = { background = Screen.colors.LightCyan1, bold = true, foreground = Screen.colors.Blue1 }, - [3] = { reverse = true }, - [4] = { background = Screen.colors.LightBlue }, - [5] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey }, - [6] = { bold = true, foreground = Screen.colors.Blue1 }, - [7] = { bold = true, reverse = true }, - [8] = { bold = true, background = Screen.colors.Red }, - [9] = { background = Screen.colors.LightMagenta }, - [10] = { bold = true, foreground = Screen.colors.Brown }, - [11] = { foreground = Screen.colors.Brown }, - }) exec([[ call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b']) vnew @@ -1241,50 +1217,50 @@ it('diff updates line numbers below filler lines', function() setlocal number rnu cursorline cursorlineopt=number foldcolumn=0 ]]) screen:expect([[ - {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:----------------}|*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] [+] }| + {7: }a │{15:1 }^a | + {7: }a │{8: 1 }a | + {7: }a │{8: 2 }a | + {7: }{27:x}{4: }│{8: 3 }{27:y}{4: }| + {7: }{22:x }│{8: }{23:----------------}|*2 + {7: }b │{8: 4 }b | + {7: }b │{8: 5 }b | + {7: }b │{8: 6 }b | + {7: }b │{8: 7 }b | + {7: }b │{8: 8 }b | + {1:~ }│{1:~ }| + {2:[No Name] [+] }{3:[No Name] [+] }| | ]]) feed('j') screen:expect([[ - {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:----------------}|*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] [+] }| + {7: }a │{8: 1 }a | + {7: }a │{15:2 }^a | + {7: }a │{8: 1 }a | + {7: }{27:x}{4: }│{8: 2 }{27:y}{4: }| + {7: }{22:x }│{8: }{23:----------------}|*2 + {7: }b │{8: 3 }b | + {7: }b │{8: 4 }b | + {7: }b │{8: 5 }b | + {7: }b │{8: 6 }b | + {7: }b │{8: 7 }b | + {1:~ }│{1:~ }| + {2:[No Name] [+] }{3:[No Name] [+] }| | ]]) feed('j') screen:expect([[ - {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:----------------}|*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] [+] }| + {7: }a │{8: 2 }a | + {7: }a │{8: 1 }a | + {7: }a │{15:3 }^a | + {7: }{27:x}{4: }│{8: 1 }{27:y}{4: }| + {7: }{22:x }│{8: }{23:----------------}|*2 + {7: }b │{8: 2 }b | + {7: }b │{8: 3 }b | + {7: }b │{8: 4 }b | + {7: }b │{8: 5 }b | + {7: }b │{8: 6 }b | + {1:~ }│{1:~ }| + {2:[No Name] [+] }{3:[No Name] [+] }| | ]]) end) @@ -1293,16 +1269,6 @@ end) it('Align the filler lines when changing text in diff mode', function() local screen = Screen.new(40, 20) screen:attach() - screen:set_default_attr_ids({ - [1] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.Gray }, - [2] = { background = Screen.colors.LightCyan, foreground = Screen.colors.Blue1, bold = true }, - [3] = { reverse = true }, - [4] = { background = Screen.colors.LightBlue }, - [5] = { background = Screen.colors.LightMagenta }, - [6] = { background = Screen.colors.Red, bold = true }, - [7] = { foreground = Screen.colors.Blue1, bold = true }, - [8] = { reverse = true, bold = true }, - }) exec([[ call setline(1, range(1, 15)) vnew @@ -1313,54 +1279,54 @@ it('Align the filler lines when changing text in diff mode', function() ]]) screen:expect { grid = [[ - {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:~ }|*8 - {8:[No Name] [+] }{3:[No Name] [+] }| + {7: }{23:------------------}│{7: }{22:6 }| + {7: }{23:------------------}│{7: }{22:7 }| + {7: }{23:------------------}│{7: }{22:8 }| + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }11 │{7: }11 | + {7: }12 │{7: }12 | + {7: }13 │{7: }13 | + {7: }14 │{7: }14 | + {7:- }1^5 │{7:- }15 | + {1:~ }│{1:~ }|*8 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]], } feed('ax<Esc>') screen:expect { grid = [[ - {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:~ }|*8 - {8:[No Name] [+] }{3:[No Name] [+] }| + {7: }{23:------------------}│{7: }{22:6 }| + {7: }{23:------------------}│{7: }{22:7 }| + {7: }{23:------------------}│{7: }{22:8 }| + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }11 │{7: }11 | + {7: }12 │{7: }12 | + {7: }13 │{7: }13 | + {7: }14 │{7: }14 | + {7: }{4:15}{27:^x}{4: }│{7: }{4:15 }| + {1:~ }│{1:~ }|*8 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]], } feed('<C-W>lay<Esc>') screen:expect { grid = [[ - {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:~ }|*8 - {3:[No Name] [+] }{8:[No Name] [+] }| + {7: }{23:-----------------}│{7: }{22:6 }| + {7: }{23:-----------------}│{7: }{22:7 }| + {7: }{23:-----------------}│{7: }{22:8 }| + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }11 │{7: }11 | + {7: }12 │{7: }12 | + {7: }13 │{7: }13 | + {7: }14 │{7: }14 | + {7: }{4:15}{27:x}{4: }│{7: }{4:15}{27:^y}{4: }| + {1:~ }│{1:~ }|*8 + {2:[No Name] [+] }{3:[No Name] [+] }| | ]], } @@ -1368,15 +1334,12 @@ end) it("diff mode doesn't restore invalid 'foldcolumn' value #21647", function() local screen = Screen.new(60, 6) - screen:set_default_attr_ids({ - [0] = { foreground = Screen.colors.Blue, bold = true }, - }) screen:attach() eq('0', api.nvim_get_option_value('foldcolumn', {})) command('diffsplit | bd') screen:expect([[ ^ | - {0:~ }|*4 + {1:~ }|*4 | ]]) eq('0', api.nvim_get_option_value('foldcolumn', {})) @@ -1385,16 +1348,9 @@ end) -- oldtest: Test_diff_binary() it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', function() local screen = Screen.new(40, 20) - screen:set_default_attr_ids({ - [1] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.Gray }, - [2] = { reverse = true }, - [3] = { background = Screen.colors.LightBlue }, - [4] = { background = Screen.colors.LightMagenta }, - [5] = { background = Screen.colors.Red, bold = true }, - [6] = { foreground = Screen.colors.Blue, bold = true }, - [7] = { background = Screen.colors.Red, foreground = Screen.colors.Blue, bold = true }, - [8] = { reverse = true, bold = true }, - }) + screen:add_extra_attr_ids { + [100] = { foreground = Screen.colors.Blue, bold = true, background = Screen.colors.Red }, + } screen:attach() exec([[ call setline(1, ['a', 'b', "c\n", 'd', 'e', 'f', 'g']) @@ -1408,15 +1364,15 @@ 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: }│{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:~ }|*11 - {8:[No Name] [+] }{2:[No Name] [+] }| + {7: }{27:^A}{4: }│{7: }{27:a}{4: }| + {7: }b │{7: }b | + {7: }{4:c }│{7: }{4:c}{100:^@}{4: }| + {7: }d │{7: }d | + {7: }{27:E}{4: }│{7: }{27:e}{4: }| + {7: }f │{7: }f | + {7: }g │{7: }g | + {1:~ }│{1:~ }|*11 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -1424,15 +1380,15 @@ 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 │{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:~ }|*11 - {8:[No Name] [+] }{2:[No Name] [+] }| + {7: }^A │{7: }a | + {7: }b │{7: }b | + {7: }{4:c }│{7: }{4:c}{100:^@}{4: }| + {7: }d │{7: }d | + {7: }E │{7: }e | + {7: }f │{7: }f | + {7: }g │{7: }g | + {1:~ }│{1:~ }|*11 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -1440,15 +1396,15 @@ 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: }│{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:~ }|*11 - {8:[No Name] [+] }{2:[No Name] [+] }| + {7: }{27:^A}{4: }│{7: }{27:a}{4: }| + {7: }b │{7: }b | + {7: }{4:c }│{7: }{4:c}{100:^@}{4: }| + {7: }d │{7: }d | + {7: }{27:E}{4: }│{7: }{27:e}{4: }| + {7: }f │{7: }f | + {7: }g │{7: }g | + {1:~ }│{1:~ }|*11 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -1456,15 +1412,15 @@ 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 │{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:~ }|*11 - {8:[No Name] [+] }{2:[No Name] [+] }| + {7: }^A │{7: }a | + {7: }b │{7: }b | + {7: }{4:c }│{7: }{4:c}{100:^@}{4: }| + {7: }d │{7: }d | + {7: }E │{7: }e | + {7: }f │{7: }f | + {7: }g │{7: }g | + {1:~ }│{1:~ }|*11 + {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) end) @@ -1473,12 +1429,6 @@ end) it("diff mode draws 'breakindent' correctly after filler lines", function() local screen = Screen.new(45, 8) screen:attach() - screen:set_default_attr_ids({ - [1] = { background = Screen.colors.Grey, foreground = Screen.colors.DarkBlue }, - [2] = { background = Screen.colors.LightBlue }, - [3] = { background = Screen.colors.LightCyan, bold = true, foreground = Screen.colors.Blue }, - [4] = { foreground = Screen.colors.Blue, bold = true }, - }) exec([[ set laststatus=0 diffopt+=followwrap breakindent breakindentopt=min:0 call setline(1, ['a', ' ' .. repeat('c', 50)]) @@ -1488,11 +1438,11 @@ it("diff mode draws 'breakindent' correctly after filler lines", function() norm! G$ ]]) screen:expect([[ - {1: }a │{1: }a | - {1: }{2:b }│{1: }{3:--------------------}| - {1: } cccccccccccccccccc│{1: } cccccccccccccccccc|*2 - {1: } cccccccccccccc │{1: } ccccccccccccc^c | - {4:~ }│{4:~ }|*2 + {7: }a │{7: }a | + {7: }{22:b }│{7: }{23:--------------------}| + {7: } cccccccccccccccccc│{7: } cccccccccccccccccc|*2 + {7: } cccccccccccccc │{7: } ccccccccccccc^c | + {1:~ }│{1:~ }|*2 | ]]) end) |