Introduction
Introduction Statistics Contact Development Disclaimer Help
tReverse the cursor on selection. - st - [fork] customized build of st, the sim…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 2677296147fe658376be67821449b8f232c65064
parent 5ece2b5f4a2e56ddfb82e797dc973fca38c5273d
Author: Christoph Lohmann <[email protected]>
Date: Mon, 5 Oct 2015 21:06:42 +0200
Reverse the cursor on selection.
Diffstat:
M st.c | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -3828,6 +3828,7 @@ xdrawcursor(void)
static int oldx = 0, oldy = 0;
int curx;
Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs};
+ int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN);
LIMIT(oldx, 0, term.col-1);
LIMIT(oldy, 0, term.row-1);
t@@ -3841,6 +3842,8 @@ xdrawcursor(void)
curx--;
g.u = term.line[term.c.y][term.c.x].u;
+ if (ena_sel && selected(term.c.x, term.c.y))
+ g.mode ^= ATTR_REVERSE;
/* remove the old cursor */
xdrawglyph(term.line[oldy][oldx], oldx, oldy);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.