A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/e5b5cbd19c6374540ee6ffa6d8b27ceb8a293f65 below:

check gui colours for highlights first · neovim/neovim@e5b5cbd · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+28

-15

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+28

-15

lines changed Original file line number Diff line number Diff line change

@@ -386,30 +386,43 @@ static uint32_t prt_get_term_color(int colorindex)

386 386

return cterm_color_8[colorindex % 8];

387 387

}

388 388 389 -

static void prt_get_attr(int hl_id, prt_text_attr_T *pattr, int modec)

389 +

static uint32_t prt_get_color(int hl_id, int modec)

390 390

{

391 391

int colorindex;

392 392

uint32_t fg_color;

393 393 394 +

const char *color = highlight_color(hl_id, "fg#", 'g');

395 +

if (color != NULL) {

396 +

RgbValue rgb = name_to_color(color);

397 +

if (rgb != -1) {

398 +

return (uint32_t)rgb;

399 +

}

400 +

}

401 + 402 +

color = highlight_color(hl_id, "fg", modec);

403 +

if (color == NULL) {

404 +

colorindex = 0;

405 +

} else {

406 +

colorindex = atoi(color);

407 +

}

408 + 409 +

if (colorindex >= 0 && colorindex < t_colors) {

410 +

fg_color = prt_get_term_color(colorindex);

411 +

} else {

412 +

fg_color = PRCOLOR_BLACK;

413 +

}

414 + 415 +

return fg_color;

416 +

}

417 + 418 +

static void prt_get_attr(int hl_id, prt_text_attr_T *pattr, int modec)

419 +

{

394 420

pattr->bold = (highlight_has_attr(hl_id, HL_BOLD, modec) != NULL);

395 421

pattr->italic = (highlight_has_attr(hl_id, HL_ITALIC, modec) != NULL);

396 422

pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);

397 423

pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);

398 424 399 -

{

400 -

const char *color = highlight_color(hl_id, "fg", modec);

401 -

if (color == NULL) {

402 -

colorindex = 0;

403 -

} else {

404 -

colorindex = atoi(color);

405 -

}

406 - 407 -

if (colorindex >= 0 && colorindex < t_colors) {

408 -

fg_color = prt_get_term_color(colorindex);

409 -

} else {

410 -

fg_color = PRCOLOR_BLACK;

411 -

}

412 -

}

425 +

uint32_t fg_color = prt_get_color(hl_id, modec);

413 426 414 427

if (fg_color == PRCOLOR_WHITE) {

415 428

fg_color = PRCOLOR_BLACK;

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4