diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-20 14:58:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-20 14:58:23 +0000 |
commit | 7905f4600dd4ee0f88c4fadf1641c2afb2acc77a (patch) | |
tree | d7556b95b5862b5493e722077fe08e11156a20e3 /grid.c | |
parent | 41c39e9bd96b1078058dd3febc0d2ff313c5c9c8 (diff) | |
parent | f81d72326458ec421348ab5aecc7038c1850407c (diff) | |
download | rtmux-7905f4600dd4ee0f88c4fadf1641c2afb2acc77a.tar.gz rtmux-7905f4600dd4ee0f88c4fadf1641c2afb2acc77a.tar.bz2 rtmux-7905f4600dd4ee0f88c4fadf1641c2afb2acc77a.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -511,6 +511,7 @@ grid_string_cells_code(const struct grid_cell *lastgc, for (i = 0; i < nitems(attrs); i++) { if (!(attr & attrs[i].mask) && (lastattr & attrs[i].mask)) { s[n++] = 0; + lastattr &= GRID_ATTR_CHARSET; break; } } @@ -523,7 +524,8 @@ grid_string_cells_code(const struct grid_cell *lastgc, /* If the foreground c changed, append its parameters. */ nnewc = grid_string_cells_fg(gc, newc); noldc = grid_string_cells_fg(lastgc, oldc); - if (nnewc != noldc || memcmp(newc, oldc, nnewc * sizeof newc[0]) != 0) { + if (nnewc != noldc || + memcmp(newc,oldc, nnewc * sizeof newc[0]) != 0) { for (i = 0; i < nnewc; i++) s[n++] = newc[i]; } @@ -531,7 +533,8 @@ grid_string_cells_code(const struct grid_cell *lastgc, /* If the background c changed, append its parameters. */ nnewc = grid_string_cells_bg(gc, newc); noldc = grid_string_cells_bg(lastgc, oldc); - if (nnewc != noldc || memcmp(newc, oldc, nnewc * sizeof newc[0]) != 0) { + if (nnewc != noldc || + memcmp(newc, oldc, nnewc * sizeof newc[0]) != 0) { for (i = 0; i < nnewc; i++) s[n++] = newc[i]; } |