diff options
author | luukvbaal <luukvbaal@gmail.com> | 2024-06-01 12:10:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-01 18:10:35 +0800 |
commit | f2083bd55cafe861e9dffb1c1658e5b0983c5ef6 (patch) | |
tree | f25ec1af928c20a90e127cfe31bd1897441a8154 /test/functional/ui/decorations_spec.lua | |
parent | 138a93a057dabd70673b7466bf5af41bd66f1385 (diff) | |
download | rneovim-f2083bd55cafe861e9dffb1c1658e5b0983c5ef6.tar.gz rneovim-f2083bd55cafe861e9dffb1c1658e5b0983c5ef6.tar.bz2 rneovim-f2083bd55cafe861e9dffb1c1658e5b0983c5ef6.zip |
fix(column): crash with 'signcolumn' set to "number" (#29003)
Problem: Numberwidth may depend on number of signs with text in the
buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
handled properly for legacy and extmark signs alike.
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 746bfb3262..3e67e33ddb 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -5497,6 +5497,26 @@ l5 api.nvim_buf_clear_namespace(0, ns, 0, -1) end) + + it([[correct numberwidth with 'signcolumn' set to "number" #28984]], function() + command('set number numberwidth=1 signcolumn=number') + api.nvim_buf_set_extmark(0, ns, 0, 0, { sign_text = 'S1' }) + screen:expect({ + grid = [[ + S1 ^ | + {1:~ }|*8 + | + ]] + }) + api.nvim_buf_del_extmark(0, ns, 1) + screen:expect({ + grid = [[ + {8:1 }^ | + {1:~ }|*8 + | + ]] + }) + end) end) describe('decorations: virt_text', function() |