[dev] [PATCH 5/5] selsnap: remove xt variable

From: noname <noname_AT_inventati.org>
Date: Thu, 30 Apr 2015 21:23:15 +0000

It is equal to term.col-1 in any case.
---
 st.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/st.c b/st.c
index 695233b..4d383be 100644
--- a/st.c
+++ b/st.c
_AT_@ -719,7 +719,7 @@ selected(int x, int y) {
 
 void
 selsnap(int *x, int *y, int direction) {
-	int newx, newy, xt, yt;
+	int newx, newy, yt;
 	bool delim;
 	Glyph *gp, *prevgp;
 
_AT_@ -739,11 +739,8 @@ selsnap(int *x, int *y, int direction) {
 				if (!BETWEEN(newy, 0, term.row - 1))
 					break;
 
-				if(direction > 0)
-					yt = *y, xt = *x;
-				else
-					yt = newy, xt = newx;
-				if(!(term.line[yt][xt].mode & ATTR_WRAP))
+				yt = direction > 0 ? *y : newy;
+				if(!(term.line[yt][term.col-1].mode & ATTR_WRAP))
 					break;
 			}
 
-- 
1.8.4
Received on Thu Apr 30 2015 - 23:23:15 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 30 2015 - 23:24:13 CEST