shithub: zuke

Download patch

ref: a8dc8cef1b523d8cb295610297d7f397afe55233
parent: 80f1401b7c81f625ddfd96de06abe97d6058ae66
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Feb 22 13:58:53 EST 2016

don't redraw while entering()

--- a/zuke.c
+++ b/zuke.c
@@ -46,6 +46,7 @@
 static Channel *ev;
 static Mousectl *mctl;
 static Keyboardctl *kctl;
+static int entering;
 
 #pragma varargck type "P" int
 static int
@@ -76,6 +77,9 @@
 	int i, colwidth;
 	char tmp[32];
 
+	if(entering)
+		return;
+
 	if(new && getwindow(display, Refnone) < 0)
 		sysfatal("getwindow: %r");
 	else
@@ -491,8 +495,11 @@
 	int inc;
 
 	inc = (d == '/' || d == 'n') ? 1 : -1;
-	if(d == '/' || d == '?')
+	if(d == '/' || d == '?'){
+		entering = 1;
 		sz = enter(inc > 0 ? "forward:" : "backward:", buf, sizeof(buf), mctl, kctl, nil);
+		entering = 0;
+	}
 	if(sz < 1 || (inc > 0 && pcur >= plnum-1) || (inc < 0 && pcur < 1))
 		return;