diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-11-11 00:52:50 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-11-17 15:10:15 +0100 |
commit | c4afb9788c4f139eb2e3b7aa4d6a6a20b67ba156 (patch) | |
tree | abc3a6da1906ea61f40aaacf3bdb813c27e19d64 /test/functional/ui/decorations_spec.lua | |
parent | ba58c6f8a44c9c37e97fce1d802dc5b5defceb3d (diff) | |
download | rneovim-c4afb9788c4f139eb2e3b7aa4d6a6a20b67ba156.tar.gz rneovim-c4afb9788c4f139eb2e3b7aa4d6a6a20b67ba156.tar.bz2 rneovim-c4afb9788c4f139eb2e3b7aa4d6a6a20b67ba156.zip |
refactor(sign): move legacy signs to extmarks
Problem: The legacy signlist data structures and associated functions are
redundant since the introduction of extmark signs.
Solution: Store signs defined through the legacy commands in a hashmap, placed
signs in the extmark tree. Replace signlist associated functions.
Usage of the legacy sign commands should yield no change in behavior with the
exception of:
- "orphaned signs" are now always removed when the line it is placed on is
deleted. This used to depend on the value of 'signcolumn'.
- It is no longer possible to place multiple signs with the same identifier
in a single group on multiple lines. This will now move the sign instead.
Moreover, both signs placed through the legacy sign commands and through
|nvim_buf_set_extmark()|:
- Will show up in both |sign-place| and |nvim_buf_get_extmarks()|.
- Are displayed by increasing sign identifier, left to right.
Extmark signs used to be ordered decreasingly as opposed to legacy signs.
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 9c16f76359..b3b3128fdd 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -4680,7 +4680,7 @@ l5 screen:expect{grid=[[ {1: }^l1 | - S2S1l2 | + S1S2l2 | {1: }l3 | {1: }l4 | {1: }l5 | @@ -4720,7 +4720,7 @@ l5 screen:expect{grid=[[ {1: }^l1 | S1{1: }l2 | - S2S1l3 | + S1S2l3 | S2{1: }l4 | {1: }l5 | {1: } | @@ -4765,7 +4765,7 @@ l5 meths.buf_set_extmark(0, ns, 2, -1, {sign_text='S5'}) screen:expect{grid=[[ - S4S1^l1 | + S1S4^l1 | x S2l2 | S5{1: }l3 | {1: }l4 | @@ -4792,9 +4792,9 @@ l5 meths.buf_set_extmark(0, ns, 2, -1, {sign_text='S5'}) screen:expect{grid=[[ - S3S4S1^l1 | + S1S3S4^l1 | x S2S3l2 | - S5S3{1: }l3 | + S3S5{1: }l3 | S3{1: }l4 | S3{1: }l5 | {1: } | @@ -4848,15 +4848,15 @@ l5 end screen:expect{grid=[[ - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | - X Y Z W {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:^h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:h} | + W X Y Z {3:a} {3:b} {3:c} {3:d} {3:e} {3:f} {3:g} {3:^h} | | ]]} end) |