aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-16 22:14:28 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-12-18 16:22:13 +0100
commit6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6 (patch)
tree20bfbe8b317fde86121fcf9af10975b2b95e5758 /src/nvim/highlight.c
parent8c173cec295cf8c78bdbc440dc87f0473560f69a (diff)
downloadrneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.tar.gz
rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.tar.bz2
rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.zip
docs: add style rule regarding initialization
Specifically, specify that each initialization should be done on a separate line.
Diffstat (limited to 'src/nvim/highlight.c')
-rw-r--r--src/nvim/highlight.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c
index 141761c52e..6684a20607 100644
--- a/src/nvim/highlight.c
+++ b/src/nvim/highlight.c
@@ -713,7 +713,8 @@ int hl_blend_attrs(int back_attr, int front_attr, bool *through)
static int rgb_blend(int ratio, int rgb1, int rgb2)
{
- int a = ratio, b = 100 - ratio;
+ int a = ratio;
+ int b = 100 - ratio;
int r1 = (rgb1 & 0xFF0000) >> 16;
int g1 = (rgb1 & 0x00FF00) >> 8;
int b1 = (rgb1 & 0x0000FF) >> 0;
@@ -940,7 +941,11 @@ HlAttrs dict2hlattrs(Dict(highlight) *dict, bool use_rgb, int *link_id, Error *e
{
#define HAS_KEY_X(d, key) HAS_KEY(d, highlight, key)
HlAttrs hlattrs = HLATTRS_INIT;
- int32_t fg = -1, bg = -1, ctermfg = -1, ctermbg = -1, sp = -1;
+ int32_t fg = -1;
+ int32_t bg = -1;
+ int32_t ctermfg = -1;
+ int32_t ctermbg = -1;
+ int32_t sp = -1;
int blend = -1;
int16_t mask = 0;
int16_t cterm_mask = 0;