Sync OpenBSD patchset 394:

Permit attributes to be turned off in #[] by prefixing with "no", for example
"noblink".
This commit is contained in:
Tiago Cunha
2009-10-15 01:31:38 +00:00
parent 8bdcc10c8f
commit 8ab3a3d9aa
2 changed files with 15 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $Id: screen-write.c,v 1.73 2009-09-15 23:54:57 tcunha Exp $ */
/* $Id: screen-write.c,v 1.74 2009-10-15 01:31:38 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -347,6 +347,10 @@ screen_write_parsestyle(
bg = defgc->bg;
} else
return;
} else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
if ((val = attributes_fromstring(tmp + 2)) == -1)
return;
attr &= ~val;
} else {
if ((val = attributes_fromstring(tmp)) == -1)
return;