diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-04-07 15:36:39 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-04-07 16:27:50 +1000 |
| commit | 57baad4afde8d1bab4040c5a5cbe8a5b367bceba (patch) | |
| tree | 5e4f5fba17f8a6038301fcb129f36db102b0bd70 /src/display_buffer.cc | |
| parent | 6adb28ec1243adf13126ee47444d57dd2b842945 (diff) | |
Make FaceRegistry scoped
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.
colorscheme apply on global scope, which should be good enough for
now.
Fixes #1411
Diffstat (limited to 'src/display_buffer.cc')
| -rw-r--r-- | src/display_buffer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/display_buffer.cc b/src/display_buffer.cc index a634ff5b..20b5588c 100644 --- a/src/display_buffer.cc +++ b/src/display_buffer.cc @@ -3,6 +3,7 @@ #include "assert.hh" #include "buffer.hh" #include "buffer_utils.hh" +#include "face_registry.hh" #include "utf8.hh" #include "face_registry.hh" @@ -241,7 +242,7 @@ void DisplayBuffer::optimize() line.optimize(); } -DisplayLine parse_display_line(StringView line, const HashMap<String, DisplayLine>& builtins) +DisplayLine parse_display_line(StringView line, const FaceRegistry& faces, const HashMap<String, DisplayLine>& builtins) { DisplayLine res; bool was_antislash = false; @@ -278,7 +279,7 @@ DisplayLine parse_display_line(StringView line, const HashMap<String, DisplayLin ++closing; } else - face = get_face({it+1, closing}); + face = faces[{it+1, closing}]; it = closing; pos = closing + 1; } |
