diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
commit | 7a7f497b483cd65e340064f23ed1c73425ecba0a (patch) | |
tree | d5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /test/functional/legacy/listlbr_utf8_spec.lua | |
parent | 1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2 rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip |
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'test/functional/legacy/listlbr_utf8_spec.lua')
-rw-r--r-- | test/functional/legacy/listlbr_utf8_spec.lua | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/functional/legacy/listlbr_utf8_spec.lua b/test/functional/legacy/listlbr_utf8_spec.lua index d7f4c71af2..8e5d9b88bc 100644 --- a/test/functional/legacy/listlbr_utf8_spec.lua +++ b/test/functional/legacy/listlbr_utf8_spec.lua @@ -1,12 +1,14 @@ -- Test for linebreak and list option in utf-8 mode local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') local source = helpers.source local feed = helpers.feed +local exec = helpers.exec local clear, expect = helpers.clear, helpers.expect describe('linebreak', function() - setup(clear) + before_each(clear) -- luacheck: ignore 621 (Indentation) -- luacheck: ignore 613 (Trailing whitespaces in a string) @@ -208,4 +210,29 @@ describe('linebreak', function() a b c¶ Screen attributes are the same!]]) end) + + -- oldtest: Test_visual_ends_before_showbreak() + it("Visual area is correct when it ends before multibyte 'showbreak'", function() + local screen = Screen.new(60, 8) + screen:set_default_attr_ids({ + [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText + [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual + [2] = { bold = true }, -- ModeMsg + }) + screen:attach() + exec([[ + let &wrap = v:true + let &linebreak = v:true + let &showbreak = '↪ ' + eval ['xxxxx ' .. 'y'->repeat(&columns - 6) .. ' zzzz']->setline(1) + normal! wvel + ]]) + screen:expect([[ + xxxxx | + {0:↪ }{1:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy}^ {1: }| + {0:↪ }zzzz | + {0:~ }|*4 + {2:-- VISUAL --} | + ]]) + end) end) |