iReverse the cursor on selection. - st - Simple Terminal Err gopher.r-36.net 70 i Err gopher.r-36.net 70 1Log /scm/st//log.gph gopher.r-36.net 70 1Files /scm/st//files.gph gopher.r-36.net 70 1Refs /scm/st//refs.gph gopher.r-36.net 70 1README /scm/st//file/README.gph gopher.r-36.net 70 1LICENSE /scm/st//file/LICENSE.gph gopher.r-36.net 70 i--- Err gopher.r-36.net 70 1commit 2677296147fe658376be67821449b8f232c65064 /scm/st//commit/2677296147fe658376be67821449b8f232c65064.gph gopher.r-36.net 70 1parent 5ece2b5f4a2e56ddfb82e797dc973fca38c5273d /scm/st//commit/5ece2b5f4a2e56ddfb82e797dc973fca38c5273d.gph gopher.r-36.net 70 hAuthor: Christoph Lohmann <20h@r-36.net> URL:mailto:20h@r-36.net gopher.r-36.net 70 iDate: Mon, 5 Oct 2015 21:06:42 +0200 Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iReverse the cursor on selection. Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iDiffstat: Err gopher.r-36.net 70 i st.c | 3 +++ Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i1 file changed, 3 insertions(+), 0 deletions(-) Err gopher.r-36.net 70 i--- Err gopher.r-36.net 70 1diff --git a/st.c b/st.c /scm/st//file/st.c.gph gopher.r-36.net 70 i@@ -3828,6 +3828,7 @@ xdrawcursor(void) Err gopher.r-36.net 70 i static int oldx = 0, oldy = 0; Err gopher.r-36.net 70 i int curx; Err gopher.r-36.net 70 i Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}; Err gopher.r-36.net 70 i+ int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i LIMIT(oldx, 0, term.col-1); Err gopher.r-36.net 70 i LIMIT(oldy, 0, term.row-1); Err gopher.r-36.net 70 i@@ -3841,6 +3842,8 @@ xdrawcursor(void) Err gopher.r-36.net 70 i curx--; Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i g.u = term.line[term.c.y][term.c.x].u; Err gopher.r-36.net 70 i+ if (ena_sel && selected(term.c.x, term.c.y)) Err gopher.r-36.net 70 i+ g.mode ^= ATTR_REVERSE; Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i /* remove the old cursor */ Err gopher.r-36.net 70 i xdrawglyph(term.line[oldy][oldx], oldx, oldy); Err gopher.r-36.net 70 .