core: replace char "," by "~" in color codes to separate foreground from background (closes #1264)

v2.8-utf8proc
Sébastien Helleu 2019-06-07 21:29:05 +02:00
parent f065b43b71
commit 7aa82db471
6 changed files with 143 additions and 81 deletions

View File

@ -15,6 +15,13 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
(file _ReleaseNotes.adoc_ in sources).
[[v2.6]]
== Version 2.6 (under dev)
Bug fixes::
* core: replace char "," by "~" in color codes to separate foreground from background (issue #1264)
[[v2.5]]
== Version 2.5 (2019-06-06)

View File

@ -873,34 +873,46 @@ All combinations are summarized in this table:
[width="100%",cols="4,2,2,8",options="header"]
|===
| Code | Example | Areas | Description
| [hex]#19# + STD | [hex]#19# `+01+` | chat + bars | Set attributes and color using option, see table below.
| [hex]#19# + EXT | [hex]#19# `+@00001+` | chat | Set color with a ncurses pair (used only on `/color` buffer).
| [hex]#19# + "F" + (A)STD | [hex]#19# `+F*05+` | chat + bars | Set foreground (WeeChat color).
| [hex]#19# + "F" + (A)EXT | [hex]#19# `+F@00214+` | chat + bars | Set foreground (extended color).
| [hex]#19# + "B" + STD | [hex]#19# `+B05+` | chat + bars | Set background (WeeChat color).
| [hex]#19# + "B" + EXT | [hex]#19# `+B@00124+` | chat + bars | Set background (extended color).
| [hex]#19# + "*" + (A)STD | [hex]#19# `+*05+` | chat + bars | Set foreground (WeeChat color).
| [hex]#19# + "*" + (A)EXT | [hex]#19# `+*@00214+` | chat + bars | Set foreground (extended color).
| [hex]#19# + "*" + (A)STD + "," + STD | [hex]#19# `+*08,05+` | chat + bars | Set foreground/background (WeeChat colors).
| [hex]#19# + "*" + (A)STD + "," + EXT | [hex]#19# `+*01,@00214+` | chat + bars | Set foreground (WeeChat color) and background (extended color).
| [hex]#19# + "*" + (A)EXT + "," + STD | [hex]#19# `+*@00214,05+` | chat + bars | Set foreground (extended color) and background (WeeChat color).
| [hex]#19# + "*" + (A)EXT + "," + EXT | [hex]#19# `+*@00214,@00017+` | chat + bars | Set foreground/background (extended colors).
| [hex]#19# + "b" + "F" | [hex]#19# `+bF+` | bars | Set bar foreground color.
| [hex]#19# + "b" + "D" | [hex]#19# `+bD+` | bars | Set bar delimiter color.
| [hex]#19# + "b" + "B" | [hex]#19# `+bB+` | bars | Set bar background color.
| [hex]#19# + "b" + "_" | [hex]#19# `+b_+` | input bar | Start input char (used only in item "input_text").
| [hex]#19# + "b" + "-" | [hex]#19# `+b-+` | input bar | Start input hidden char (used only in item "input_text").
| [hex]#19# + "b" + "#" | [hex]#19# `+b#+` | input bar | Move cursor char (used only in item "input_text").
| [hex]#19# + "b" + "i" | [hex]#19# `+bi+` | bars | Start item.
| [hex]#19# + "b" + "l" (lower L) | [hex]#19# `+bl+` | bars | Start line item.
| [hex]#19# + "E" | [hex]#19# `+E+` | chat + bars | Emphasize text _(WeeChat ≥ 0.4.2)_.
| [hex]#19# + [hex]#1C# | [hex]#19# [hex]#1C# | chat + bars | Reset color (keep attributes).
| [hex]#1A# + ATTR | [hex]#1A# `+*+` | chat + bars | Set attribute.
| [hex]#1B# + ATTR | [hex]#1B# `+*+` | chat + bars | Remove attribute.
| [hex]#1C# | [hex]#1C# | chat + bars | Reset attributes and color.
| Code | Example | Areas | Description
| [hex]#19# + STD | [hex]#19# `+01+` | chat + bars | Set attributes and color using option, see table below.
| [hex]#19# + EXT | [hex]#19# `+@00001+` | chat | Set color with a ncurses pair (used only on `/color` buffer).
| [hex]#19# + "F" + (A)STD | [hex]#19# `+F*05+` | chat + bars | Set foreground (WeeChat color).
| [hex]#19# + "F" + (A)EXT | [hex]#19# `+F@00214+` | chat + bars | Set foreground (extended color).
| [hex]#19# + "B" + STD | [hex]#19# `+B05+` | chat + bars | Set background (WeeChat color).
| [hex]#19# + "B" + EXT | [hex]#19# `+B@00124+` | chat + bars | Set background (extended color).
| [hex]#19# + "*" + (A)STD | [hex]#19# `+*05+` | chat + bars | Set foreground (WeeChat color).
| [hex]#19# + "*" + (A)EXT | [hex]#19# `+*@00214+` | chat + bars | Set foreground (extended color).
| [hex]#19# + "*" + (A)STD + "," + STD ^(1)^ | [hex]#19# `+*08,05+` | chat + bars | Set foreground/background (WeeChat colors).
| [hex]#19# + "*" + (A)STD + "," + EXT ^(1)^ | [hex]#19# `+*01,@00214+` | chat + bars | Set foreground (WeeChat color) and background (extended color).
| [hex]#19# + "*" + (A)EXT + "," + STD ^(1)^ | [hex]#19# `+*@00214,05+` | chat + bars | Set foreground (extended color) and background (WeeChat color).
| [hex]#19# + "*" + (A)EXT + "," + EXT ^(1)^ | [hex]#19# `+*@00214,@00017+` | chat + bars | Set foreground/background (extended colors).
| [hex]#19# + "*" + (A)STD + "~" + STD | [hex]#19# `+*08~05+` | chat + bars | Set foreground/background (WeeChat colors).
| [hex]#19# + "*" + (A)STD + "~" + EXT | [hex]#19# `+*01~@00214+` | chat + bars | Set foreground (WeeChat color) and background (extended color).
| [hex]#19# + "*" + (A)EXT + "~" + STD | [hex]#19# `+*@00214~05+` | chat + bars | Set foreground (extended color) and background (WeeChat color).
| [hex]#19# + "*" + (A)EXT + "~" + EXT | [hex]#19# `+*@00214~@00017+` | chat + bars | Set foreground/background (extended colors).
| [hex]#19# + "b" + "F" | [hex]#19# `+bF+` | bars | Set bar foreground color.
| [hex]#19# + "b" + "D" | [hex]#19# `+bD+` | bars | Set bar delimiter color.
| [hex]#19# + "b" + "B" | [hex]#19# `+bB+` | bars | Set bar background color.
| [hex]#19# + "b" + "_" | [hex]#19# `+b_+` | input bar | Start input char (used only in item "input_text").
| [hex]#19# + "b" + "-" | [hex]#19# `+b-+` | input bar | Start input hidden char (used only in item "input_text").
| [hex]#19# + "b" + "#" | [hex]#19# `+b#+` | input bar | Move cursor char (used only in item "input_text").
| [hex]#19# + "b" + "i" | [hex]#19# `+bi+` | bars | Start item.
| [hex]#19# + "b" + "l" (lower L) | [hex]#19# `+bl+` | bars | Start line item.
| [hex]#19# + "E" | [hex]#19# `+E+` | chat + bars | Emphasize text _(WeeChat ≥ 0.4.2)_.
| [hex]#19# + [hex]#1C# | [hex]#19# [hex]#1C# | chat + bars | Reset color (keep attributes).
| [hex]#1A# + ATTR | [hex]#1A# `+*+` | chat + bars | Set attribute.
| [hex]#1B# + ATTR | [hex]#1B# `+*+` | chat + bars | Remove attribute.
| [hex]#1C# | [hex]#1C# | chat + bars | Reset attributes and color.
|===
[NOTE]
^(1)^ The use of comma as separator was used until WeeChat 2.5. +
With WeeChat ≥ 2.6, a tilde is used to separate foreground from background
color. If you are developing a WeeChat relay client and want to be compatible
with all WeeChat versions, you should support both separators (for example if a
user with WeeChat ≤ 2.5 runs `/upgrade` to a version ≥ 2.6, both separators
could be used at same time in buffers).
Color codes using options (see _t_gui_color_enum_, in file
_src/gui/gui-color.h_):

View File

@ -888,34 +888,48 @@ Toutes les combinaisons sont résumées dans ce tableau :
[width="100%",cols="4,2,2,8",options="header"]
|===
| Code | Exemple | Aires | Description
| [hex]#19# + STD | [hex]#19# `+01+` | chat + barres | Définir les attributs et la couleur en utilisant une option, voir le tableau ci-dessous.
| [hex]#19# + EXT | [hex]#19# `+@00001+` | chat | Définir une couleur avec la paire ncurses (utilisé seulement sur le tampon `/color`).
| [hex]#19# + "F" + (A)STD | [hex]#19# `+F*05+` | chat + barres | Définir la couleur de texte (couleur WeeChat).
| [hex]#19# + "F" + (A)EXT | [hex]#19# `+F@00214+` | chat + barres | Définir la couleur de texte (couleur étendue).
| [hex]#19# + "B" + STD | [hex]#19# `+B05+` | chat + barres | Définir la couleur de fond (couleur WeeChat).
| [hex]#19# + "B" + EXT | [hex]#19# `+B@00124+` | chat + barres | Définir le couleur de fond (couleur étendue).
| [hex]#19# + "*" + (A)STD | [hex]#19# `+*05+` | chat + barres | Définir la couleur de texte (couleur WeeChat).
| [hex]#19# + "*" + (A)EXT | [hex]#19# `+*@00214+` | chat + barres | Définir la couleur de texte (couleur étendue).
| [hex]#19# + "*" + (A)STD + "," + STD | [hex]#19# `+*08,05+` | chat + barres | Définir la couleur de texte/fond (couleurs WeeChat).
| [hex]#19# + "*" + (A)STD + "," + EXT | [hex]#19# `+*01,@00214+` | chat + barres | Définir la couleur de texte (couleur WeeChat) et de fond (couleur étendue).
| [hex]#19# + "*" + (A)EXT + "," + STD | [hex]#19# `+*@00214,05+` | chat + barres | Définir la couleur de texte (couleur étendue) et de fond (couleur WeeChat).
| [hex]#19# + "*" + (A)EXT + "," + EXT | [hex]#19# `+*@00214,@00017+` | chat + barres | Définir la couleur de texte/fond (couleurs étendues).
| [hex]#19# + "b" + "F" | [hex]#19# `+bF+` | barres | Définir la couleur de texte de la barre.
| [hex]#19# + "b" + "D" | [hex]#19# `+bD+` | barres | Définir la couleur du délimiteur de la barre.
| [hex]#19# + "b" + "B" | [hex]#19# `+bB+` | barres | Définir la couleur de fond de la barre.
| [hex]#19# + "b" + "_" | [hex]#19# `+b_+` | barre input | Caractère de démarrage dans l'entrée (utilisé seulement dans l'objet "input_text").
| [hex]#19# + "b" + "-" | [hex]#19# `+b-+` | barre input | Caractère de démarrage caché dans l'entrée (utilisé seulement dans l'objet "input_text").
| [hex]#19# + "b" + "#" | [hex]#19# `+b#+` | barre input | Caractère de déplacement du curseur (utilisé seulement dans l'objet "input_text").
| [hex]#19# + "b" + "i" | [hex]#19# `+bi+` | barres | Début d'objet.
| [hex]#19# + "b" + "l" (lower L) | [hex]#19# `+bl+` | barres | Ligne de démarrage d'objet.
| [hex]#19# + "E" | [hex]#19# `+E+` | chat + barres | Texte mis en valeur _(WeeChat ≥ 0.4.2)_.
| [hex]#19# + [hex]#1C# | [hex]#19# [hex]#1C# | chat + barres | Réinitialiser la couleur (garder les attributs).
| [hex]#1A# + ATTR | [hex]#1A# `+*+` | chat + barres | Activer un attribut.
| [hex]#1B# + ATTR | [hex]#1B# `+*+` | chat + barres | Supprimer un attribut.
| [hex]#1C# | [hex]#1C# | chat + barres | Réinitialiser les attributs et la couleur.
| Code | Exemple | Aires | Description
| [hex]#19# + STD | [hex]#19# `+01+` | chat + barres | Définir les attributs et la couleur en utilisant une option, voir le tableau ci-dessous.
| [hex]#19# + EXT | [hex]#19# `+@00001+` | chat | Définir une couleur avec la paire ncurses (utilisé seulement sur le tampon `/color`).
| [hex]#19# + "F" + (A)STD | [hex]#19# `+F*05+` | chat + barres | Définir la couleur de texte (couleur WeeChat).
| [hex]#19# + "F" + (A)EXT | [hex]#19# `+F@00214+` | chat + barres | Définir la couleur de texte (couleur étendue).
| [hex]#19# + "B" + STD | [hex]#19# `+B05+` | chat + barres | Définir la couleur de fond (couleur WeeChat).
| [hex]#19# + "B" + EXT | [hex]#19# `+B@00124+` | chat + barres | Définir le couleur de fond (couleur étendue).
| [hex]#19# + "*" + (A)STD | [hex]#19# `+*05+` | chat + barres | Définir la couleur de texte (couleur WeeChat).
| [hex]#19# + "*" + (A)EXT | [hex]#19# `+*@00214+` | chat + barres | Définir la couleur de texte (couleur étendue).
| [hex]#19# + "*" + (A)STD + "," + STD ^(1)^ | [hex]#19# `+*08,05+` | chat + barres | Définir la couleur de texte/fond (couleurs WeeChat).
| [hex]#19# + "*" + (A)STD + "," + EXT ^(1)^ | [hex]#19# `+*01,@00214+` | chat + barres | Définir la couleur de texte (couleur WeeChat) et de fond (couleur étendue).
| [hex]#19# + "*" + (A)EXT + "," + STD ^(1)^ | [hex]#19# `+*@00214,05+` | chat + barres | Définir la couleur de texte (couleur étendue) et de fond (couleur WeeChat).
| [hex]#19# + "*" + (A)EXT + "," + EXT ^(1)^ | [hex]#19# `+*@00214,@00017+` | chat + barres | Définir la couleur de texte/fond (couleurs étendues).
| [hex]#19# + "*" + (A)STD + "~" + STD | [hex]#19# `+*08~05+` | chat + barres | Définir la couleur de texte/fond (couleurs WeeChat).
| [hex]#19# + "*" + (A)STD + "~" + EXT | [hex]#19# `+*01~@00214+` | chat + barres | Définir la couleur de texte (couleur WeeChat) et de fond (couleur étendue).
| [hex]#19# + "*" + (A)EXT + "~" + STD | [hex]#19# `+*@00214~05+` | chat + barres | Définir la couleur de texte (couleur étendue) et de fond (couleur WeeChat).
| [hex]#19# + "*" + (A)EXT + "~" + EXT | [hex]#19# `+*@00214~@00017+` | chat + barres | Définir la couleur de texte/fond (couleurs étendues).
| [hex]#19# + "b" + "F" | [hex]#19# `+bF+` | barres | Définir la couleur de texte de la barre.
| [hex]#19# + "b" + "D" | [hex]#19# `+bD+` | barres | Définir la couleur du délimiteur de la barre.
| [hex]#19# + "b" + "B" | [hex]#19# `+bB+` | barres | Définir la couleur de fond de la barre.
| [hex]#19# + "b" + "_" | [hex]#19# `+b_+` | barre input | Caractère de démarrage dans l'entrée (utilisé seulement dans l'objet "input_text").
| [hex]#19# + "b" + "-" | [hex]#19# `+b-+` | barre input | Caractère de démarrage caché dans l'entrée (utilisé seulement dans l'objet "input_text").
| [hex]#19# + "b" + "#" | [hex]#19# `+b#+` | barre input | Caractère de déplacement du curseur (utilisé seulement dans l'objet "input_text").
| [hex]#19# + "b" + "i" | [hex]#19# `+bi+` | barres | Début d'objet.
| [hex]#19# + "b" + "l" (lower L) | [hex]#19# `+bl+` | barres | Ligne de démarrage d'objet.
| [hex]#19# + "E" | [hex]#19# `+E+` | chat + barres | Texte mis en valeur _(WeeChat ≥ 0.4.2)_.
| [hex]#19# + [hex]#1C# | [hex]#19# [hex]#1C# | chat + barres | Réinitialiser la couleur (garder les attributs).
| [hex]#1A# + ATTR | [hex]#1A# `+*+` | chat + barres | Activer un attribut.
| [hex]#1B# + ATTR | [hex]#1B# `+*+` | chat + barres | Supprimer un attribut.
| [hex]#1C# | [hex]#1C# | chat + barres | Réinitialiser les attributs et la couleur.
|===
[NOTE]
^(1)^ L'utilisation de virgule comme séparateur était utilisé jusqu'à
WeeChat 2.5. +
Avec WeeChat WeeChat ≥ 2.6, un tilde est utilisé pour séparer la
couleur du texte et du fond. Si vous développez un client WeeChat relay et
voulez être compatible avec toutes les versions de WeeChat, vous devriez
supporter les deux séparateurs (par exemple si un utilisateur avec WeeChat ≤ 2.5
lance `/upgrade` vers une version ≥ 2.6, les deux séparateurs pourront être
utilisés au même moment dans les tampons).
Les codes couleur utilisant des options (voir _t_gui_color_enum_, dans le
fichier _src/gui/gui-color.h_) :

View File

@ -873,34 +873,47 @@ WeeChat は文字列中に独自の色コードを使うことで、属性
[width="100%",cols="4,2,2,8",options="header"]
|===
| コード | 例 | エリア | 説明
| [hex]#19# + STD | [hex]#19# `+01+` | chat + bars | オプションを使って属性と色を指定、色コードは以下の表を参照
| [hex]#19# + EXT | [hex]#19# `+@00001+` | chat | ncurses ペアを使って色を指定 (`/color` バッファのみ有効)
| [hex]#19# + "F" + (A)STD | [hex]#19# `+F*05+` | chat + bars | 文字色 (WeeChat 色) を設定
| [hex]#19# + "F" + (A)EXT | [hex]#19# `+F@00214+` | chat + bars | 文字色 (拡張色) を設定
| [hex]#19# + "B" + STD | [hex]#19# `+B05+` | chat + bars | 背景色 (WeeChat 色) を設定
| [hex]#19# + "B" + EXT | [hex]#19# `+B@00124+` | chat + bars | 背景色 (拡張色) を設定
| [hex]#19# + "*" + (A)STD | [hex]#19# `+*05+` | chat + bars | 文字色(WeeChat 色) を設定
| [hex]#19# + "*" + (A)EXT | [hex]#19# `+*@00214+` | chat + bars | 文字色 (拡張色) を設定
| [hex]#19# + "*" + (A)STD + "," + STD | [hex]#19# `+*08,05+` | chat + bars | 文字色および背景色 (WeeChat 色) を設定
| [hex]#19# + "*" + (A)STD + "," + EXT | [hex]#19# `+*01,@00214+` | chat + bars | 文字色 (WeeChat 色) と背景色 (拡張色) を設定
| [hex]#19# + "*" + (A)EXT + "," + STD | [hex]#19# `+*@00214,05+` | chat + bars | 文字色 (拡張色) と背景色 (WeeChat 色) を設定
| [hex]#19# + "*" + (A)EXT + "," + EXT | [hex]#19# `+*@00214,@00017+` | chat + bars | 文字色および背景色 (拡張色) を設定
| [hex]#19# + "b" + "F" | [hex]#19# `+bF+` | bars | バーの文字色を設定
| [hex]#19# + "b" + "D" | [hex]#19# `+bD+` | bars | バーの区切り文字色を設定
| [hex]#19# + "b" + "B" | [hex]#19# `+bB+` | bars | バーの背景色を設定
| [hex]#19# + "b" + "_" | [hex]#19# `+b_+` | input bar | 文字入力を開始 ("input_text" 要素のみで利用可)
| [hex]#19# + "b" + "-" | [hex]#19# `+b-+` | input bar | 隠し文字入力を開始 ("input_text" 要素のみで利用可)
| [hex]#19# + "b" + "#" | [hex]#19# `+b#+` | input bar | カーソル文字を移動 ("input_text" 要素のみで利用可)
| [hex]#19# + "b" + "i" | [hex]#19# `+bi+` | bars | 要素を開始
| [hex]#19# + "b" + "l" (小文字の L) | [hex]#19# `+bl+` | bars | 行要素を開始
| [hex]#19# + "E" | [hex]#19# `+E+` | chat + bars | テキストを強調 _(WeeChat バージョン 0.4.2 以上で利用可)_
| [hex]#19# + [hex]#1C# | [hex]#19# [hex]#1C# | chat + bars | 色をリセット (属性は保存)
| [hex]#1A# + ATTR | [hex]#1A# `+*+` | chat + bars | 属性を設定
| [hex]#1B# + ATTR | [hex]#1B# `+*+` | chat + bars | 属性を削除
| [hex]#1C# | [hex]#1C# | chat + bars | 属性と色をリセット
| コード | 例 | エリア | 説明
| [hex]#19# + STD | [hex]#19# `+01+` | chat + bars | オプションを使って属性と色を指定、色コードは以下の表を参照
| [hex]#19# + EXT | [hex]#19# `+@00001+` | chat | ncurses ペアを使って色を指定 (`/color` バッファのみ有効)
| [hex]#19# + "F" + (A)STD | [hex]#19# `+F*05+` | chat + bars | 文字色 (WeeChat 色) を設定
| [hex]#19# + "F" + (A)EXT | [hex]#19# `+F@00214+` | chat + bars | 文字色 (拡張色) を設定
| [hex]#19# + "B" + STD | [hex]#19# `+B05+` | chat + bars | 背景色 (WeeChat 色) を設定
| [hex]#19# + "B" + EXT | [hex]#19# `+B@00124+` | chat + bars | 背景色 (拡張色) を設定
| [hex]#19# + "*" + (A)STD | [hex]#19# `+*05+` | chat + bars | 文字色(WeeChat 色) を設定
| [hex]#19# + "*" + (A)EXT | [hex]#19# `+*@00214+` | chat + bars | 文字色 (拡張色) を設定
| [hex]#19# + "*" + (A)STD + "," + STD ^(1)^ | [hex]#19# `+*08,05+` | chat + bars | 文字色および背景色 (WeeChat 色) を設定
| [hex]#19# + "*" + (A)STD + "," + EXT ^(1)^ | [hex]#19# `+*01,@00214+` | chat + bars | 文字色 (WeeChat 色) と背景色 (拡張色) を設定
| [hex]#19# + "*" + (A)EXT + "," + STD ^(1)^ | [hex]#19# `+*@00214,05+` | chat + bars | 文字色 (拡張色) と背景色 (WeeChat 色) を設定
| [hex]#19# + "*" + (A)EXT + "," + EXT ^(1)^ | [hex]#19# `+*@00214,@00017+` | chat + bars | 文字色および背景色 (拡張色) を設定
| [hex]#19# + "*" + (A)STD + "~" + STD | [hex]#19# `+*08~05+` | chat + bars | 文字色および背景色 (WeeChat 色) を設定
| [hex]#19# + "*" + (A)STD + "~" + EXT | [hex]#19# `+*01~@00214+` | chat + bars | 文字色 (WeeChat 色) と背景色 (拡張色) を設定
| [hex]#19# + "*" + (A)EXT + "~" + STD | [hex]#19# `+*@00214~05+` | chat + bars | 文字色 (拡張色) と背景色 (WeeChat 色) を設定
| [hex]#19# + "*" + (A)EXT + "~" + EXT | [hex]#19# `+*@00214~@00017+` | chat + bars | 文字色および背景色 (拡張色) を設定
| [hex]#19# + "b" + "F" | [hex]#19# `+bF+` | bars | バーの文字色を設定
| [hex]#19# + "b" + "D" | [hex]#19# `+bD+` | bars | バーの区切り文字色を設定
| [hex]#19# + "b" + "B" | [hex]#19# `+bB+` | bars | バーの背景色を設定
| [hex]#19# + "b" + "_" | [hex]#19# `+b_+` | input bar | 文字入力を開始 ("input_text" 要素のみで利用可)
| [hex]#19# + "b" + "-" | [hex]#19# `+b-+` | input bar | 隠し文字入力を開始 ("input_text" 要素のみで利用可)
| [hex]#19# + "b" + "#" | [hex]#19# `+b#+` | input bar | カーソル文字を移動 ("input_text" 要素のみで利用可)
| [hex]#19# + "b" + "i" | [hex]#19# `+bi+` | bars | 要素を開始
| [hex]#19# + "b" + "l" (小文字の L) | [hex]#19# `+bl+` | bars | 行要素を開始
| [hex]#19# + "E" | [hex]#19# `+E+` | chat + bars | テキストを強調 _(WeeChat バージョン 0.4.2 以上で利用可)_
| [hex]#19# + [hex]#1C# | [hex]#19# [hex]#1C# | chat + bars | 色をリセット (属性は保存)
| [hex]#1A# + ATTR | [hex]#1A# `+*+` | chat + bars | 属性を設定
| [hex]#1B# + ATTR | [hex]#1B# `+*+` | chat + bars | 属性を削除
| [hex]#1C# | [hex]#1C# | chat + bars | 属性と色をリセット
|===
// TRANSLATION MISSING
[NOTE]
^(1)^ The use of comma as separator was used until WeeChat 2.5. +
With WeeChat ≥ 2.6, a tilde is used to separate foreground from background
color. If you are developing a WeeChat relay client and want to be compatible
with all WeeChat versions, you should support both separators (for example if a
user with WeeChat ≤ 2.5 runs `/upgrade` to a version ≥ 2.6, both separators
could be used at same time in buffers).
オプションを使う色コード
(_src/gui/gui-color.h_ ファイルの _t_gui_color_enum_ を参照):

View File

@ -792,7 +792,12 @@ gui_window_string_apply_color_fg_bg (unsigned char **string, WINDOW *window)
ptr_string += 2;
}
}
if (ptr_string[0] == ',')
/*
* note: the comma is an old separator not used any more
* (since WeeChat 2.6), but we still use it here so in case of /upgrade
* this will not break colors in old messages
*/
if ((ptr_string[0] == ',') || (ptr_string[0] == '~'))
{
ptr_string++;
if (ptr_string[0] == GUI_COLOR_EXTENDED_CHAR)

View File

@ -461,8 +461,13 @@ gui_color_get_custom (const char *color_name)
if (color_fg[0] && color_bg[0])
{
/*
* note: until WeeChat 2.5, the separator was a comma, and it has
* been changed to a tilde (to prevent problems with /eval and
* ${color:FF,BB}
*/
snprintf (color[index_color], sizeof (color[index_color]),
"%c%c%s,%s",
"%c%c%s~%s",
GUI_COLOR_COLOR_CHAR,
GUI_COLOR_FG_BG_CHAR,
color_fg,
@ -659,7 +664,13 @@ gui_color_decode (const char *string, const char *replacement)
if (ptr_string[0] && ptr_string[1])
ptr_string += 2;
}
if (ptr_string[0] == ',')
/*
* note: the comma is an old separator not used any
* more (since WeeChat 2.6), but we still use it here
* so in case of/upgrade this will not break colors in
* old messages
*/
if ((ptr_string[0] == ',') || (ptr_string[0] == '~'))
{
if (ptr_string[1] == GUI_COLOR_EXTENDED_CHAR)
{