diff options
| -rw-r--r-- | st.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -3828,6 +3828,7 @@ xdrawcursor(void) | |||
| 3828 | static int oldx = 0, oldy = 0; | 3828 | static int oldx = 0, oldy = 0; |
| 3829 | int curx; | 3829 | int curx; |
| 3830 | Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}; | 3830 | Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}; |
| 3831 | int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); | ||
| 3831 | 3832 | ||
| 3832 | LIMIT(oldx, 0, term.col-1); | 3833 | LIMIT(oldx, 0, term.col-1); |
| 3833 | LIMIT(oldy, 0, term.row-1); | 3834 | LIMIT(oldy, 0, term.row-1); |
| @@ -3841,6 +3842,8 @@ xdrawcursor(void) | |||
| 3841 | curx--; | 3842 | curx--; |
| 3842 | 3843 | ||
| 3843 | g.u = term.line[term.c.y][term.c.x].u; | 3844 | g.u = term.line[term.c.y][term.c.x].u; |
| 3845 | if (ena_sel && selected(term.c.x, term.c.y)) | ||
| 3846 | g.mode ^= ATTR_REVERSE; | ||
| 3844 | 3847 | ||
| 3845 | /* remove the old cursor */ | 3848 | /* remove the old cursor */ |
| 3846 | xdrawglyph(term.line[oldy][oldx], oldx, oldy); | 3849 | xdrawglyph(term.line[oldy][oldx], oldx, oldy); |
