acme: allow spaces in window names

There are many things we could do to make this work.
an environment variable to control the character.
Another option would be to use U+00A0 (non-breaking space),
which renders the same as space.

This change avoids changing the separator character and instead
assumes that if the left side of the tag already ends in " Del Snarf |"
then what comes before that is the file name.
Acme already aggressively preserves the "Del Snarf |",
so this should work decently well as a stop-gap.
We can always try something else later.

Fixes #26.
Fixes #104.
Fixes #329.
This commit is contained in:
Russ Cox 2020-01-13 20:02:54 -05:00
parent 26cae02da7
commit 7b1c85f6e8
2 changed files with 20 additions and 5 deletions

View file

@ -610,7 +610,7 @@ expandfile(Text *t, uint q0, uint q1, Expand *e)
if(nname == -1)
nname = n;
for(i=0; i<nname; i++)
if(!isfilec(r[i]))
if(!isfilec(r[i]) && r[i] != ' ')
goto Isntfile;
/*
* See if it's a file name in <>, and turn that into an include