mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Some fixes for searching for tabs, from Alexander Arch.
This commit is contained in:
10
grid.c
10
grid.c
@ -235,9 +235,13 @@ grid_check_y(struct grid *gd, const char *from, u_int py)
|
||||
int
|
||||
grid_cells_look_equal(const struct grid_cell *gc1, const struct grid_cell *gc2)
|
||||
{
|
||||
int flags1 = gc1->flags, flags2 = gc2->flags;;
|
||||
|
||||
if (gc1->fg != gc2->fg || gc1->bg != gc2->bg)
|
||||
return (0);
|
||||
if (gc1->attr != gc2->attr || gc1->flags != gc2->flags)
|
||||
if (gc1->attr != gc2->attr)
|
||||
return (0);
|
||||
if ((flags1 & ~GRID_FLAG_CLEARED) != (flags2 & ~GRID_FLAG_CLEARED))
|
||||
return (0);
|
||||
if (gc1->link != gc2->link)
|
||||
return (0);
|
||||
@ -261,10 +265,10 @@ grid_cells_equal(const struct grid_cell *gc1, const struct grid_cell *gc2)
|
||||
void
|
||||
grid_set_tab(struct grid_cell *gc, u_int width)
|
||||
{
|
||||
memset(&gc->data, 0, sizeof gc->data);
|
||||
memset(gc->data.data, 0, sizeof gc->data.data);
|
||||
gc->flags |= GRID_FLAG_TAB;
|
||||
gc->data.width = gc->data.size = gc->data.have = width;
|
||||
memset(&gc->data, ' ', gc->data.size);
|
||||
memset(gc->data.data, ' ', gc->data.size);
|
||||
}
|
||||
|
||||
/* Free one line. */
|
||||
|
Reference in New Issue
Block a user