mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
parent
f9c8cdb5a6
commit
0e881c054a
2 changed files with 23 additions and 16 deletions
|
@ -468,9 +468,14 @@ label(Rune *sr, int n)
|
||||||
|
|
||||||
dir = smprint("%.*S", (el-1)-(sl+3), sl+3);
|
dir = smprint("%.*S", (el-1)-(sl+3), sl+3);
|
||||||
if(dir){
|
if(dir){
|
||||||
drawsetlabel(dir);
|
if(strcmp(dir, "*9term-hold+") == 0) {
|
||||||
free(w->dir);
|
w->holding = 1;
|
||||||
w->dir = dir;
|
wrepaint(w);
|
||||||
|
} else {
|
||||||
|
drawsetlabel(dir);
|
||||||
|
free(w->dir);
|
||||||
|
w->dir = dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove trailing /-sysname if present */
|
/* remove trailing /-sysname if present */
|
||||||
|
|
|
@ -598,20 +598,22 @@ label(char *sr, int n)
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
*r = 0;
|
*r = 0;
|
||||||
/*
|
if(strcmp(sl+3, "*9term-hold+") != 0) {
|
||||||
* add /-sysname if not present
|
/*
|
||||||
*/
|
* add /-sysname if not present
|
||||||
snprint(wdir, sizeof wdir, "name %s", sl+3);
|
*/
|
||||||
p = strrchr(wdir, '/');
|
snprint(wdir, sizeof wdir, "name %s", sl+3);
|
||||||
if(p==nil || *(p+1) != '-'){
|
p = strrchr(wdir, '/');
|
||||||
p = wdir+strlen(wdir);
|
if(p==nil || *(p+1) != '-'){
|
||||||
if(*(p-1) != '/')
|
p = wdir+strlen(wdir);
|
||||||
*p++ = '/';
|
if(*(p-1) != '/')
|
||||||
*p++ = '-';
|
*p++ = '/';
|
||||||
strcpy(p, name);
|
*p++ = '-';
|
||||||
|
strcpy(p, name);
|
||||||
|
}
|
||||||
|
strcat(wdir, "\n0\n");
|
||||||
|
fswrite(ctlfd, wdir, strlen(wdir));
|
||||||
}
|
}
|
||||||
strcat(wdir, "\n0\n");
|
|
||||||
fswrite(ctlfd, wdir, strlen(wdir));
|
|
||||||
|
|
||||||
memmove(sl, el, er-el);
|
memmove(sl, el, er-el);
|
||||||
n -= (el-sl);
|
n -= (el-sl);
|
||||||
|
|
Loading…
Reference in a new issue