From 0b66aa8dda9b92302aae20e9b3e13aaca42ad0d0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 3 Dec 2019 21:17:33 +1100 Subject: [PATCH] Document that fg face is optional --- doc/pages/faces.asciidoc | 3 ++- src/face_registry.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/pages/faces.asciidoc b/doc/pages/faces.asciidoc index 4af8f663..eb382c24 100644 --- a/doc/pages/faces.asciidoc +++ b/doc/pages/faces.asciidoc @@ -7,7 +7,7 @@ color, a background color, and some attributes. The value of a face has the following format: --------------------------------------- -fg_color[,bg_color][+attributes][@base] +[fg_color][,bg_color][+attributes][@base] --------------------------------------- 'fg_color', 'bg_color':: @@ -20,6 +20,7 @@ fg_color[,bg_color][+attributes][@base] keep the existing color *rgb:RRGGBB*::: hexadecimal value + if unspecified, *default* is used. 'attributes':: string whose individual letters set an attribute: diff --git a/src/face_registry.cc b/src/face_registry.cc index 83021060..53f059aa 100644 --- a/src/face_registry.cc +++ b/src/face_registry.cc @@ -9,7 +9,7 @@ namespace Kakoune static FaceRegistry::FaceSpec parse_face(StringView facedesc) { - constexpr StringView invalid_face_error = "invalid face description, expected [,][+][@base] or just [base]"; + constexpr StringView invalid_face_error = "invalid face description, expected [][,][+][@base] or just [base]"; if (all_of(facedesc, [](char c){ return is_word(c); }) and not is_color_name(facedesc)) return {Face{}, facedesc.str()};