mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 06:16:08 +00:00
perf(highlight): don't allocate duplicates for color names
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user