feat(sign):Allow signs to be 0 width (#13290)

Adds support for signs to be 0 cells wide. If all signs of the same
group have no width, the signcolumn will not be rendered for that group.
This commit is contained in:
Lukas Reineke
2020-12-25 01:33:52 +09:00
committed by GitHub
parent 6c28bddfad
commit 88ae03bcdb
5 changed files with 133 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
#ifndef NVIM_SIGN_DEFS_H
#define NVIM_SIGN_DEFS_H
#include <stdbool.h>
#include "nvim/pos.h"
#include "nvim/types.h"
@@ -22,13 +23,14 @@ typedef struct signlist signlist_T;
struct signlist
{
int id; // unique identifier for each placed sign
linenr_T lnum; // line number which has this sign
int typenr; // typenr of sign
signgroup_T *group; // sign group
int priority; // priority for highlighting
signlist_T *next; // next signlist entry
signlist_T *prev; // previous entry -- for easy reordering
int id; // unique identifier for each placed sign
linenr_T lnum; // line number which has this sign
int typenr; // typenr of sign
bool has_text_or_icon; // has text or icon
signgroup_T *group; // sign group
int priority; // priority for highlighting
signlist_T *next; // next signlist entry
signlist_T *prev; // previous entry -- for easy reordering
};
// Default sign priority for highlighting