about summary refs log tree commit diff
path: root/Src/prompt.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-06-03 19:36:16 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-06-03 19:36:16 +0000
commit4ad0a25af110e2afe956bce13e901f78fd9e6bcd (patch)
treed1e3d3c42a0f84d926637066d85b785d4a13038a /Src/prompt.c
parent099dc207fa63dfb9d0bd16c8b084eff00a3761da (diff)
downloadzsh-4ad0a25af110e2afe956bce13e901f78fd9e6bcd.tar.gz
zsh-4ad0a25af110e2afe956bce13e901f78fd9e6bcd.tar.xz
zsh-4ad0a25af110e2afe956bce13e901f78fd9e6bcd.zip
27983: colours could be output twice
Diffstat (limited to 'Src/prompt.c')
-rw-r--r--Src/prompt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index afb9777a0..a91ac541f 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -1925,8 +1925,13 @@ set_colour_attribute(int atr, int fg_bg, int flags)
 	    } else {
 		tputs(tgoto(tcstr[tc], colour, colour), 1, putshout);
 	    }
+	    /* That worked. */
+	    return;
 	}
-	/* for 0 to 7 assume standard ANSI works, otherwise it won't. */
+	/*
+	 * Nope, that didn't work.
+	 * If 0 to 7, assume standard ANSI works, otherwise it won't.
+	 */
 	if (colour > 7)
 	    return;
     }