diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-23 07:07:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 07:07:34 +0800 |
commit | 7735163652cd9082ef89cb31707ca77df12f7b70 (patch) | |
tree | a2f84fea5e9062633255c1c4642d53e2452a234e /test/functional/ui/decorations_spec.lua | |
parent | 159111f9a59d9e366fe975bf78c223228ce9ca8a (diff) | |
download | rneovim-7735163652cd9082ef89cb31707ca77df12f7b70.tar.gz rneovim-7735163652cd9082ef89cb31707ca77df12f7b70.tar.bz2 rneovim-7735163652cd9082ef89cb31707ca77df12f7b70.zip |
fix(screen): do not do syntax highlighting at filler or folded lines (#17818)
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 7e71ada02d..29fbe9a93b 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1111,6 +1111,27 @@ if (h->n_buckets < new_n_buckets) { // expand ]]} end) + it('does not cause syntax ml_get error at the end of a buffer #17816', function() + command([[syntax region foo keepend start='^foo' end='^$']]) + command('syntax sync minlines=100') + insert('foo') + meths.buf_set_extmark(0, ns, 0, 0, {virt_lines = {{{'bar', 'Comment'}}}}) + screen:expect([[ + fo^o | + {6:bar} | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]) + end) + it('works with a block scrolling up', function() screen:try_resize(30, 7) insert("aa\nbb\ncc\ndd\nee\nff\ngg\nhh") |