aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-01-13 23:11:19 -0500
committerRuss Cox <rsc@swtch.com>2020-01-13 23:17:39 -0500
commit86bfd6075d7e7bf1f68097f11dbef94439e1f605 (patch)
treed9f8689f6c624b787cd5da15d3f6c430fff18018 /src/cmd/acme
parent7b1c85f6e8031a50e8e6f5977d12bea820e921ca (diff)
downloadplan9port-86bfd6075d7e7bf1f68097f11dbef94439e1f605.tar.gz
plan9port-86bfd6075d7e7bf1f68097f11dbef94439e1f605.tar.bz2
plan9port-86bfd6075d7e7bf1f68097f11dbef94439e1f605.zip
acme: fix movetodel for spaces in file names
Diffstat (limited to 'src/cmd/acme')
-rw-r--r--src/cmd/acme/wind.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c
index 248680fe..2782dbc7 100644
--- a/src/cmd/acme/wind.c
+++ b/src/cmd/acme/wind.c
@@ -110,18 +110,15 @@ windrawbutton(Window *w)
int
delrunepos(Window *w)
{
- int n;
- Rune rune;
+ Rune *r;
+ int i;
- 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)
+ 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;