diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-12-13 23:30:19 +0100 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2023-12-14 08:55:00 +0000 |
commit | 320e9c1c21817fd76b84345018661f70437fa4b5 (patch) | |
tree | 3f31bbdaba63c5e78227cdb8c4f36feb1f4af0e6 /test/functional/ui/sign_spec.lua | |
parent | aa05133b0e4e2157275936c31adbbd5b739b716d (diff) | |
download | rneovim-320e9c1c21817fd76b84345018661f70437fa4b5.tar.gz rneovim-320e9c1c21817fd76b84345018661f70437fa4b5.tar.bz2 rneovim-320e9c1c21817fd76b84345018661f70437fa4b5.zip |
fix(extmark): only invalidate unpaired marks on deleted rows
Problem: Unpaired marks are invalidated if its column is deleted,
which may just be a "placeholder" column, e.g. for signs.
Solution: Only remove unpaired marks if its entire row is deleted.
Diffstat (limited to 'test/functional/ui/sign_spec.lua')
-rw-r--r-- | test/functional/ui/sign_spec.lua | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua index bf2830f2f0..316d3fe3ac 100644 --- a/test/functional/ui/sign_spec.lua +++ b/test/functional/ui/sign_spec.lua @@ -218,14 +218,15 @@ describe('Signs', function() ]]) -- "auto:3" accommodates all the signs we defined so far. command('set signcolumn=auto:3') - screen:expect([[ + local s3 = [[ {1:>>}{8:XX}{2: }{6: 1 }a | {8:XX}{1:>>}{2: }{6: 2 }b | {8:XX}{1:>>}WW{6: 3 }c | {2: }{6: 4 }^ | {0:~ }|*9 | - ]]) + ]] + screen:expect(s3) -- Check "yes:9". command('set signcolumn=yes:9') screen:expect([[ @@ -239,14 +240,7 @@ describe('Signs', function() -- Check "auto:N" larger than the maximum number of signs defined in -- a single line (same result as "auto:3"). command('set signcolumn=auto:4') - screen:expect{grid=[[ - {1:>>}{8:XX}{2: }{6: 1 }a | - {8:XX}{1:>>}{2: }{6: 2 }b | - {8:XX}{1:>>}WW{6: 3 }c | - {2: }{6: 4 }^ | - {0:~ }|*9 - | - ]]} + screen:expect(s3) -- line deletion deletes signs. command('3move1') command('2d') @@ -257,6 +251,15 @@ describe('Signs', function() {0:~ }|*10 | ]]) + -- character deletion does not delete signs. + feed('x') + screen:expect([[ + {1:>>}{8:XX}{6: 1 }a | + {8:XX}{1:>>}{6: 2 }^ | + {2: }{6: 3 } | + {0:~ }|*10 + | + ]]) end) it('auto-resize sign column with minimum size (#13783)', function() |