summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorSebastian Gniazdowski <sgniazdowski@gmail.com>2016-04-28 22:24:27 +0200
committerPeter Stephenson <pws@zsh.org>2016-04-29 10:17:44 +0100
commit7fc0c2d57db1c0ee71f66ff73ab5655294a245c0 (patch)
tree6b6da29d8d2bef30e65df6c67de3a0aa113d5f8d /Src/Modules
parent5ee05cf9353b36e2dbe4149717ec239d074d1f21 (diff)
downloadzsh-7fc0c2d57db1c0ee71f66ff73ab5655294a245c0.tar.gz
zsh-7fc0c2d57db1c0ee71f66ff73ab5655294a245c0.tar.xz
zsh-7fc0c2d57db1c0ee71f66ff73ab5655294a245c0.zip
39354: zcurses fix for colour management
Alter internal return 	code so as not to mask curses error code.
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/curses.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index a04841a85..7fff858f4 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -324,7 +324,7 @@ zcurses_color(const char *color)
 	    return (short)zc->number;
 	}
 
-    return (short)-1;
+    return (short)-2;
 }
 
 static Colorpairnode
@@ -353,10 +353,10 @@ zcurses_colorget(const char *nam, char *colorpair)
 	f = zcurses_color(cp);
 	b = zcurses_color(bg+1);
 
-	if (f==-1 || b==-1) {
-	    if (f == -1)
+	if (f==-2 || b==-2) {
+	    if (f == -2)
 		zwarnnam(nam, "foreground color `%s' not known", cp);
-	    if (b == -1)
+	    if (b == -2)
 		zwarnnam(nam, "background color `%s' not known", bg+1);
 	    *bg = '/';
 	    zsfree(cp);