diff options
author | oni-link <knil.ino@gmail.com> | 2019-06-24 00:01:02 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-06-24 00:01:01 +0200 |
commit | 0bdeec8ef02bcd497f6df77b2a00420c948c9438 (patch) | |
tree | 237ac0b457654991ecde9a7a211c954b4d68e60c /test/functional/ui/sign_spec.lua | |
parent | 9ce34050e549baf2c85e23fc3370f3ffebc773ad (diff) | |
download | rneovim-0bdeec8ef02bcd497f6df77b2a00420c948c9438.tar.gz rneovim-0bdeec8ef02bcd497f6df77b2a00420c948c9438.tar.bz2 rneovim-0bdeec8ef02bcd497f6df77b2a00420c948c9438.zip |
screen: Adjust buffer sizes for multiple sign columns #10314
* screen: Fix to draw signs with combining characters.
The buffer size for signs can be too small, because the upper length
limit of a sign can be 56 bytes. If combining characters are only two
bytes in size, this reduces to 32 bytes.
* screen: Adjust buffer size to maximal sign column count
Diffstat (limited to 'test/functional/ui/sign_spec.lua')
-rw-r--r-- | test/functional/ui/sign_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua index 2b38a2a58d..68e675b8e5 100644 --- a/test/functional/ui/sign_spec.lua +++ b/test/functional/ui/sign_spec.lua @@ -31,6 +31,30 @@ describe('Signs', function() end) describe(':sign place', function() + it('allows signs with combining characters', function() + feed('ia<cr>b<cr><esc>') + command('sign define piet1 text=𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄ texthl=Search') + command('sign define piet2 text=𠜎̀́̂̃̄̅ texthl=Search') + command('sign place 1 line=1 name=piet1 buffer=1') + command('sign place 2 line=2 name=piet2 buffer=1') + screen:expect([[ + {1:𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄}a | + {1:𠜎̀́̂̃̄̅}b | + {2: }^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + | + ]]) + end) + it('shadows previously placed signs', function() feed('ia<cr>b<cr>c<cr><esc>') command('sign define piet text=>> texthl=Search') |