diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-29 23:15:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-29 23:15:07 +0200 |
commit | c60e409471c51864883bd0b874980d0a8857f813 (patch) | |
tree | 64444c3f0210461e398654e3d6dd6f00e0091cd9 /src/nvim/hardcopy.c | |
parent | c35420558bed0bfa9938ecd1facec88f1df392a5 (diff) | |
parent | 46efe14473fa803f84509592cc1e8fca4eb20640 (diff) | |
download | rneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.gz rneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.bz2 rneovim-c60e409471c51864883bd0b874980d0a8857f813.zip |
Merge #5119 from ZyX-I/split-eval
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 19d97ecfef..4cb05ffc12 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -369,7 +369,6 @@ static void prt_get_attr(int hl_id, prt_text_attr_T *pattr, int modec) { int colorindex; uint32_t fg_color; - char *color; pattr->bold = (highlight_has_attr(hl_id, HL_BOLD, modec) != NULL); pattr->italic = (highlight_has_attr(hl_id, HL_ITALIC, modec) != NULL); @@ -377,11 +376,12 @@ static void prt_get_attr(int hl_id, prt_text_attr_T *pattr, int modec) pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL); { - color = (char *)highlight_color(hl_id, (char_u *)"fg", modec); - if (color == NULL) + const char *color = highlight_color(hl_id, "fg", modec); + if (color == NULL) { colorindex = 0; - else + } else { colorindex = atoi(color); + } if (colorindex >= 0 && colorindex < t_colors) fg_color = prt_get_term_color(colorindex); |