frontend: switch to new bluelib tty interface
This commit is contained in:
@@ -64,11 +64,10 @@ struct hl_range *get_next_hl_range(struct hl_range *range)
|
||||
return range;
|
||||
}
|
||||
|
||||
int apply_hl_range(
|
||||
struct hl_range *range, struct s_tty *tty, unsigned int x, unsigned int y)
|
||||
int apply_hl_range(struct hl_range *range, b_tty *tty, unsigned int x, unsigned int y)
|
||||
{
|
||||
if (!range) {
|
||||
s_tty_reset_vmode(tty);
|
||||
b_tty_reset_vmode(tty);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -76,11 +75,11 @@ int apply_hl_range(
|
||||
int cmp_end = compare_coords(x, y, range->h_end_x, range->h_end_y);
|
||||
|
||||
if (cmp_start < 0) {
|
||||
s_tty_reset_vmode(tty);
|
||||
b_tty_reset_vmode(tty);
|
||||
}
|
||||
|
||||
if (cmp_start >= 0 && cmp_end <= 0) {
|
||||
s_tty_set_vmode(tty, &range->h_vmode);
|
||||
b_tty_set_vmode(tty, &range->h_vmode);
|
||||
}
|
||||
|
||||
if (cmp_end == 1) {
|
||||
@@ -92,7 +91,7 @@ int apply_hl_range(
|
||||
|
||||
struct hl_range *create_highlight(
|
||||
unsigned long start_x, unsigned long start_y, unsigned long end_x,
|
||||
unsigned long end_y, const struct s_tty_vmode *vmode)
|
||||
unsigned long end_y, const b_tty_vmode *vmode)
|
||||
{
|
||||
struct hl_range *out = malloc(sizeof *out);
|
||||
if (!out) {
|
||||
@@ -181,7 +180,7 @@ static void move_start_to_meet_end(
|
||||
|
||||
void line_ed_put_highlight(
|
||||
struct line_ed *ed, unsigned long start_x, unsigned long start_y,
|
||||
unsigned long end_x, unsigned long end_y, const struct s_tty_vmode *vmode)
|
||||
unsigned long end_x, unsigned long end_y, const struct b_tty_vmode *vmode)
|
||||
{
|
||||
struct hl_range *highlight
|
||||
= create_highlight(start_x, start_y, end_x, end_y, vmode);
|
||||
|
||||
Reference in New Issue
Block a user