diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-14 09:58:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 09:58:30 +0800 |
commit | bf70a33f5e7de0218704126c149db24542e39766 (patch) | |
tree | 45190c96e29e86f2770ad1481fbf6d37794e76d4 /test/functional/ui/decorations_spec.lua | |
parent | 9f32deba56ea867a8bb9b9ab7f44bcc5142e8bbc (diff) | |
download | rneovim-bf70a33f5e7de0218704126c149db24542e39766.tar.gz rneovim-bf70a33f5e7de0218704126c149db24542e39766.tar.bz2 rneovim-bf70a33f5e7de0218704126c149db24542e39766.zip |
vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)
Problem: Peeking and flushing output slows down execution.
Solution: Do not update the mode message when global_busy is set. Do not
flush when only peeking for a character. (Ken Takata)
https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 2c4bcadc4b..df7de77333 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1775,30 +1775,36 @@ describe('extmark decorations', function() ]]) -- When only one highlight group has an underline attribute, it should always take effect. - meths.buf_clear_namespace(0, ns, 0, -1) - meths.buf_set_extmark(0, ns, 0, 0, { end_col = 9, hl_group = 'TestUL', priority = 20 }) - meths.buf_set_extmark(0, ns, 0, 3, { end_col = 6, hl_group = 'TestBold', priority = 30 }) - screen:expect([[ - {1:aaa}{5:bbb}{1:aa^a} | - {0:~ }| - | - ]]) - meths.buf_clear_namespace(0, ns, 0, -1) - meths.buf_set_extmark(0, ns, 0, 0, { end_col = 9, hl_group = 'TestUL', priority = 30 }) - meths.buf_set_extmark(0, ns, 0, 3, { end_col = 6, hl_group = 'TestBold', priority = 20 }) - screen:expect_unchanged(true) - meths.buf_clear_namespace(0, ns, 0, -1) - meths.buf_set_extmark(0, ns, 0, 0, { end_col = 9, hl_group = 'TestUC', priority = 20 }) - meths.buf_set_extmark(0, ns, 0, 3, { end_col = 6, hl_group = 'TestBold', priority = 30 }) - screen:expect([[ - {2:aaa}{6:bbb}{2:aa^a} | - {0:~ }| - | - ]]) - meths.buf_clear_namespace(0, ns, 0, -1) - meths.buf_set_extmark(0, ns, 0, 0, { end_col = 9, hl_group = 'TestUC', priority = 30 }) - meths.buf_set_extmark(0, ns, 0, 3, { end_col = 6, hl_group = 'TestBold', priority = 20 }) - screen:expect_unchanged(true) + for _, d in ipairs({-5, 5}) do + meths.buf_clear_namespace(0, ns, 0, -1) + screen:expect([[ + aaabbbaa^a | + {0:~ }| + | + ]]) + meths.buf_set_extmark(0, ns, 0, 0, { end_col = 9, hl_group = 'TestUL', priority = 25 + d }) + meths.buf_set_extmark(0, ns, 0, 3, { end_col = 6, hl_group = 'TestBold', priority = 25 - d }) + screen:expect([[ + {1:aaa}{5:bbb}{1:aa^a} | + {0:~ }| + | + ]]) + end + for _, d in ipairs({-5, 5}) do + meths.buf_clear_namespace(0, ns, 0, -1) + screen:expect([[ + aaabbbaa^a | + {0:~ }| + | + ]]) + meths.buf_set_extmark(0, ns, 0, 0, { end_col = 9, hl_group = 'TestUC', priority = 25 + d }) + meths.buf_set_extmark(0, ns, 0, 3, { end_col = 6, hl_group = 'TestBold', priority = 25 - d }) + screen:expect([[ + {2:aaa}{6:bbb}{2:aa^a} | + {0:~ }| + | + ]]) + end end) it('highlight is combined with syntax and sign linehl #20004', function() |