Explorar o código

fix bug where first selection snaps to lines

Jason Woofenden %!s(int64=9) %!d(string=hai) anos
pai
achega
f56c58a968
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      st.c

+ 3 - 2
st.c

@@ -695,9 +695,10 @@ utf8validate(Rune *u, size_t i)
 void
 selinit(void)
 {
-	memset(&sel.tclick1, 0, sizeof(sel.tclick1));
-	memset(&sel.tclick2, 0, sizeof(sel.tclick2));
+	clock_gettime(CLOCK_MONOTONIC, &sel.tclick1);
+	clock_gettime(CLOCK_MONOTONIC, &sel.tclick2);
 	sel.mode = SEL_IDLE;
+	sel.snap = 0;
 	sel.ob.x = -1;
 	sel.primary = NULL;
 	sel.clipboard = NULL;