diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-12-07 23:00:03 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-12-07 23:19:56 +0800 |
commit | b326bf5f419b345d50407be4fb43b937510112a4 (patch) | |
tree | 9447405546b5a79b72a7466eda22a9303a0a0e75 /test/functional/ui/diff_spec.lua | |
parent | afaad8b54ebd2ad4ba2145f4069f5017cace3c8f (diff) | |
download | rneovim-b326bf5f419b345d50407be4fb43b937510112a4.tar.gz rneovim-b326bf5f419b345d50407be4fb43b937510112a4.tar.bz2 rneovim-b326bf5f419b345d50407be4fb43b937510112a4.zip |
fix(screen): do not draw filler lines post eof if already at last row
Diffstat (limited to 'test/functional/ui/diff_spec.lua')
-rw-r--r-- | test/functional/ui/diff_spec.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/ui/diff_spec.lua b/test/functional/ui/diff_spec.lua index 13949b0756..bd2692d19a 100644 --- a/test/functional/ui/diff_spec.lua +++ b/test/functional/ui/diff_spec.lua @@ -186,6 +186,19 @@ describe('Diff mode screen', function() {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 | + {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + | + ]]) end) it('Add a line at the end of file 1', function() @@ -232,6 +245,19 @@ describe('Diff mode screen', function() {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 | + {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + | + ]]) end) it('Add a line in the middle of file 2, remove on at the end of file 1', function() |