[dev] [PATCH 4/5] selsnap: remove prevdelim variable

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

---
 st.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/st.c b/st.c
index 62b0889..695233b 100644
--- a/st.c
+++ b/st.c
_AT_@ -720,7 +720,7 @@ selected(int x, int y) {
 void
 selsnap(int *x, int *y, int direction) {
 	int newx, newy, xt, yt;
-	bool delim, prevdelim;
+	bool delim;
 	Glyph *gp, *prevgp;
 
 	switch(sel.snap) {
_AT_@ -730,7 +730,6 @@ selsnap(int *x, int *y, int direction) {
 		 * beginning of a line.
 		 */
 		prevgp = &term.line[*y][*x];
-		prevdelim = ISDELIM(prevgp->u);
 		for(;;) {
 			newx = *x + direction;
 			newy = *y;
_AT_@ -753,14 +752,13 @@ selsnap(int *x, int *y, int direction) {
 
 			gp = &term.line[newy][newx];
 			delim = ISDELIM(gp->u);
-			if(!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
+			if(!(gp->mode & ATTR_WDUMMY) && (delim != ISDELIM(prevgp->u)
 					|| (delim && gp->u != prevgp->u)))
 				break;
 
 			*x = newx;
 			*y = newy;
 			prevgp = gp;
-			prevdelim = delim;
 		}
 		break;
 	case SNAP_LINE:
-- 
1.8.4
Received on Thu Apr 30 2015 - 23:23:05 CEST

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