diff options
author | Quentin Rameau <quinq@fifth.space> | 2017-04-04 17:20:55 +0200 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2017-04-04 18:23:45 +0200 |
commit | 745c40f8b07ab898d1f9d4f564881b40599bc80d (patch) | |
tree | d9085c30a700df9b56c383e628ed285c25662c0c /x.c | |
parent | 149c0d3aedffe69b625ef95868daae200941d5f5 (diff) | |
download | st-745c40f8b07ab898d1f9d4f564881b40599bc80d.tar.gz st-745c40f8b07ab898d1f9d4f564881b40599bc80d.tar.bz2 st-745c40f8b07ab898d1f9d4f564881b40599bc80d.zip |
Simplify how we keep ATTRs under cursor
Thanks to tarug0 for the suggestion/patch.
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1266,7 +1266,6 @@ xdrawcursor(void) Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}, og; int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); Color drawcol; - unsigned attr; LIMIT(oldx, 0, term.col-1); LIMIT(oldy, 0, term.row-1); @@ -1286,8 +1285,8 @@ xdrawcursor(void) xdrawglyph(og, oldx, oldy); g.u = term.line[term.c.y][term.c.x].u; - attr = ATTR_BOLD | ATTR_ITALIC | ATTR_UNDERLINE | ATTR_STRUCK; - g.mode |= term.line[term.c.y][term.c.x].mode & attr; + g.mode |= term.line[term.c.y][term.c.x].mode & + (ATTR_BOLD | ATTR_ITALIC | ATTR_UNDERLINE | ATTR_STRUCK); /* * Select the right color for the right mode. |