Commit Diff


commit - 7b1c85f6e8031a50e8e6f5977d12bea820e921ca
commit + 86bfd6075d7e7bf1f68097f11dbef94439e1f605
blob - 248680fe35cb56bdff008fdc23d6d6189d12e373
blob + 2782dbc711d0e74ec30726a47dbece89a5f5cdfe
--- src/cmd/acme/wind.c
+++ src/cmd/acme/wind.c
@@ -110,18 +110,15 @@ windrawbutton(Window *w)
 int
 delrunepos(Window *w)
 {
-	int n;
-	Rune rune;
-
-	for(n=0; n<w->tag.file->b.nc; n++) {
-		bufread(&w->tag.file->b, n, &rune, 1);
-		if(rune == ' ')
-			break;
-	}
-	n += 2;
-	if(n >= w->tag.file->b.nc)
+	Rune *r;
+	int i;
+
+	r = parsetag(w, &i);
+	free(r);
+	i += 2;
+	if(i >= w->tag.file->b.nc)
 		return -1;
-	return n;
+	return i;
 }
 
 void
@@ -441,7 +438,7 @@ parsetag(Window *w, int *len)
 {
 	static Rune Ldelsnarf[] = { ' ', 'D', 'e', 'l', ' ', 'S', 'n', 'a', 'r', 'f', 0 };
 	static Rune Lspacepipe[] = { ' ', '|', 0 };
-	static Rune Ltabpipe[] = { ' ', '|', 0 };
+	static Rune Ltabpipe[] = { '\t', '|', 0 };
 	int i;
 	Rune *r, *p, *pipe;