summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-28 03:41:17 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-28 03:41:17 +0000
commitf382abee30e6ce07df88dcf43160c900dd877c09 (patch)
tree1794fb424b34fd5dcd7e78bd06e1c1544b7365e7
parent3c607672e6d450af3564cbb1bbdc913e7b311ba0 (diff)
downloadirssi-f382abee30e6ce07df88dcf43160c900dd877c09.zip
%N does now same as %n, except in .theme files it always does the
terminal default color while %n sets the "previous color". git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1150 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--default.theme5
-rw-r--r--docs/formats.txt5
-rw-r--r--src/fe-common/core/formats.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/default.theme b/default.theme
index 10d06485..0064196e 100644
--- a/default.theme
+++ b/default.theme
@@ -42,7 +42,8 @@
# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would
# print yellow "foo" (as set with %Y) but "bar" would be green, which was
# set at the beginning before the {foo} template. If there wasn't the %g
-# at start, the normal behaviour of %n would occur.
+# at start, the normal behaviour of %n would occur. If you _really_ want
+# to use the terminal's default color, use %N.
#############################################################################
@@ -135,7 +136,7 @@ abstracts = {
# public message in channel, $0 = nick mode, $1 = nick
pubmsgnick = "{msgnick $0 $1-}";
- pubnick = "%w$0-%n";
+ pubnick = "%N$0-%n";
# public message in channel meant for me, $0 = nick mode, $1 = nick
pubmsgmenick = "{msgnick $0 $1-}";
diff --git a/docs/formats.txt b/docs/formats.txt
index 3d064eaa..a3281ef2 100644
--- a/docs/formats.txt
+++ b/docs/formats.txt
@@ -12,7 +12,7 @@
%p %P magenta (think: purple)
%c %C %6 cyan bold cyan cyan
%w %W %7 white bold white white
- %n Turn off all colors and other formatting
+ %n %N Turn off all colors and other formatting
%U Underline on/off
%8 Reverse on/off
%9 %_ Bold on/off
@@ -20,6 +20,9 @@
%| Marks the indentation position
%% A single %
+ In .theme files %n works a bit differently. See default.theme
+ for more information.
+
MIRC colors that you can use when writing text to channel and with
hilighting text:
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c
index d0706ff6..b366cd3f 100644
--- a/src/fe-common/core/formats.c
+++ b/src/fe-common/core/formats.c
@@ -94,10 +94,8 @@ int format_expand_styles(GString *out, char format, TEXT_DEST_REC *dest)
case 'F':
/* flashing - ignore */
break;
- case 'N':
- /* don't put clear-color tag at the end of the output - ignore */
- break;
case 'n':
+ case 'N':
/* default color */
g_string_append_c(out, 4);
g_string_append_c(out, FORMAT_STYLE_DEFAULTS);