mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[viewer] Add _node calls for "searched" color.
Proper handling of displaying node_number's colors will be implemented later.
This commit is contained in:
parent
8d608c7be8
commit
a5d62bc4c3
@ -337,7 +337,8 @@ highlight_links_with_prefixes_that_start_with_n(struct terminal *term,
|
|||||||
struct document_view *doc_view,
|
struct document_view *doc_view,
|
||||||
int n)
|
int n)
|
||||||
{
|
{
|
||||||
struct color_pair *color = get_bfu_color(term, "searched");
|
// struct color_pair *color = get_bfu_color(term, "searched");
|
||||||
|
unsigned int node_number = get_bfu_color_node(term, "searched");
|
||||||
int xoffset = doc_view->box.x - doc_view->vs->x;
|
int xoffset = doc_view->box.x - doc_view->vs->x;
|
||||||
int yoffset = doc_view->box.y - doc_view->vs->y;
|
int yoffset = doc_view->box.y - doc_view->vs->y;
|
||||||
struct document *document = doc_view->document;
|
struct document *document = doc_view->document;
|
||||||
@ -356,8 +357,10 @@ highlight_links_with_prefixes_that_start_with_n(struct terminal *term,
|
|||||||
int x = link->points[i].x + xoffset;
|
int x = link->points[i].x + xoffset;
|
||||||
int y = link->points[i].y + yoffset;
|
int y = link->points[i].y + yoffset;
|
||||||
|
|
||||||
if (is_in_box(&doc_view->box, x, y))
|
if (is_in_box(&doc_view->box, x, y)) {
|
||||||
draw_char_color(term, x, y, color);
|
// draw_char_color(term, x, y, color);
|
||||||
|
draw_char_color_node(term, x, y, node_number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -903,7 +903,8 @@ draw_searched(struct terminal *term, struct document_view *doc_view)
|
|||||||
get_searched(doc_view, &pt, &len, utf8);
|
get_searched(doc_view, &pt, &len, utf8);
|
||||||
if (len) {
|
if (len) {
|
||||||
int i;
|
int i;
|
||||||
struct color_pair *color = get_bfu_color(term, "searched");
|
// struct color_pair *color = get_bfu_color(term, "searched");
|
||||||
|
unsigned int node_number = get_bfu_color_node(term, "searched");
|
||||||
int xoffset = doc_view->box.x - doc_view->vs->x;
|
int xoffset = doc_view->box.x - doc_view->vs->x;
|
||||||
int yoffset = doc_view->box.y - doc_view->vs->y;
|
int yoffset = doc_view->box.y - doc_view->vs->y;
|
||||||
|
|
||||||
@ -920,7 +921,8 @@ draw_searched(struct terminal *term, struct document_view *doc_view)
|
|||||||
co = ((co >> 3) & 0x0700) | ((co << 3) & 0x3800);
|
co = ((co >> 3) & 0x0700) | ((co << 3) & 0x3800);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
draw_char_color(term, x, y, color);
|
// draw_char_color(term, x, y, color);
|
||||||
|
draw_char_color_node(term, x, y, node_number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1543,7 +1545,9 @@ static void
|
|||||||
draw_typeahead_match(struct terminal *term, struct document_view *doc_view,
|
draw_typeahead_match(struct terminal *term, struct document_view *doc_view,
|
||||||
int chars, int offset)
|
int chars, int offset)
|
||||||
{
|
{
|
||||||
struct color_pair *color = get_bfu_color(term, "searched");
|
// struct color_pair *color = get_bfu_color(term, "searched");
|
||||||
|
unsigned int node_number = get_bfu_color_node(term, "searched");
|
||||||
|
|
||||||
int xoffset = doc_view->box.x - doc_view->vs->x;
|
int xoffset = doc_view->box.x - doc_view->vs->x;
|
||||||
int yoffset = doc_view->box.y - doc_view->vs->y;
|
int yoffset = doc_view->box.y - doc_view->vs->y;
|
||||||
struct link *link = get_current_link(doc_view);
|
struct link *link = get_current_link(doc_view);
|
||||||
@ -1568,7 +1572,8 @@ draw_typeahead_match(struct terminal *term, struct document_view *doc_view,
|
|||||||
} else if (i >= offset) {
|
} else if (i >= offset) {
|
||||||
/* TODO: We should take in account original colors and
|
/* TODO: We should take in account original colors and
|
||||||
* combine them with defined color. */
|
* combine them with defined color. */
|
||||||
draw_char_color(term, xoffset + x, yoffset + y, color);
|
// draw_char_color(term, xoffset + x, yoffset + y, color);
|
||||||
|
draw_char_color_node(term, xoffset + x, yoffset + y, node_number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user