diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-10-23 16:54:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-23 16:54:49 +0200 |
commit | fa4b24072e13dc7303e896701f0bb6d0227caf0c (patch) | |
tree | cc0a7302e1efd5706cb25c2c29af80fe3a7ab46e /src/nvim/marktree.h | |
parent | cb15055c294e6ebb9b2a65041cbff0a79cd3e69e (diff) | |
parent | 8d7816cf27c4ab08d9eff9e7ce3c541105c30ece (diff) | |
download | rneovim-fa4b24072e13dc7303e896701f0bb6d0227caf0c.tar.gz rneovim-fa4b24072e13dc7303e896701f0bb6d0227caf0c.tar.bz2 rneovim-fa4b24072e13dc7303e896701f0bb6d0227caf0c.zip |
Merge pull request #16029 from bfredl/multiline
feat(decorations): support more than one virt_lines block
Diffstat (limited to 'src/nvim/marktree.h')
-rw-r--r-- | src/nvim/marktree.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/marktree.h b/src/nvim/marktree.h index 02f73b8052..a1dcdf5164 100644 --- a/src/nvim/marktree.h +++ b/src/nvim/marktree.h @@ -75,4 +75,13 @@ typedef struct { #define MARKTREE_PAIRED_FLAG (((uint64_t)1) << 1) #define MARKTREE_END_FLAG (((uint64_t)1) << 0) +#define DECOR_LEVELS 4 +#define DECOR_OFFSET 61 +#define DECOR_MASK (((uint64_t)(DECOR_LEVELS-1)) << DECOR_OFFSET) + +static inline uint8_t marktree_decor_level(uint64_t id) +{ + return (uint8_t)((id&DECOR_MASK) >> DECOR_OFFSET); +} + #endif // NVIM_MARKTREE_H |