diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-06-21 12:29:49 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-06-21 18:40:33 +0200 |
commit | 374e0b6678b21105bd5a26265e483cc4d9dbcaad (patch) | |
tree | e5350659e367c935fa30b41ef526a7d13b0dff03 /src/nvim/highlight.c | |
parent | 5ad97fcc0e514aa3c31bf4bb2f374864d1a1b66b (diff) | |
download | rneovim-374e0b6678b21105bd5a26265e483cc4d9dbcaad.tar.gz rneovim-374e0b6678b21105bd5a26265e483cc4d9dbcaad.tar.bz2 rneovim-374e0b6678b21105bd5a26265e483cc4d9dbcaad.zip |
perf(highlight): don't allocate duplicates for color names
Diffstat (limited to 'src/nvim/highlight.c')
-rw-r--r-- | src/nvim/highlight.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index ee79958034..229da03cb4 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -962,7 +962,8 @@ int object_to_color(Object val, char *key, bool rgb, Error *err) } int color; if (rgb) { - color = name_to_color(str.data); + int dummy; + color = name_to_color(str.data, &dummy); } else { color = name_to_ctermcolor(str.data); } |