about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-01-11 22:04:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-01-11 22:04:24 +0000
commitbfd6782b5a7a75568be3554bbdc7d7eee53e6538 (patch)
tree75fb9fce21e3897156eed95bb68428a659c711ad /Src/Modules
parenta978d1c47cc8fab586b26b74a3abadbee0da3439 (diff)
downloadzsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.tar.gz
zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.tar.xz
zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.zip
zsh-workers/9295
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/parameter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 23097e10c..94aff0c18 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -838,8 +838,10 @@ scanpmoptions(HashTable ht, ScanFunc func, int flags)
 
     for (i = 0; i < optiontab->hsize; i++)
 	for (hn = optiontab->nodes[i]; hn; hn = hn->next) {
+	    int optno = ((Optname) hn)->optno, ison;
 	    pm.nam = hn->nam;
-	    pm.u.str = dupstring(opts[((Optname) hn)->optno] ? "on" : "off");
+	    ison = optno < 0 ? !opts[-optno] : opts[optno];
+	    pm.u.str = dupstring(ison ? "on" : "off");
 	    func((HashNode) &pm, flags);
 	}
 }