summaryrefslogtreecommitdiff
path: root/src/face.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2022-07-13 12:24:14 +1000
committerMaxime Coste <mawww@kakoune.org>2022-07-13 12:24:14 +1000
commitc7fbf1f3905f77f136e898479352e590787434d2 (patch)
tree190edecbc65bac3c2e03a53b62056b3a981cd90a /src/face.hh
parent195fe8fd29a1824372ff69e6ef8b8e5be8bc9a07 (diff)
Re-work line trimming to fix issues with column highighters
Instead of triming only buffer ranges, add a trim_from method to display line to keep the initial N columns, we know how many columns are used by non-trimable widgets in DisplaySetup::widget_columns so we can just pass this. Also restore the previous logic for face merging Fixes #4670
Diffstat (limited to 'src/face.hh')
-rw-r--r--src/face.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/face.hh b/src/face.hh
index e1047bcd..ce544116 100644
--- a/src/face.hh
+++ b/src/face.hh
@@ -65,10 +65,10 @@ inline Face merge_faces(const Face& base, const Face& face)
};
auto choose = [&](Color Face::*color, Attribute final_attr) {
- if (base.attributes & final_attr)
- return base.*color;
if (face.attributes & final_attr)
return face.*color;
+ if (base.attributes & final_attr)
+ return base.*color;
if (face.*color == Color::Default)
return base.*color;
if ((base.*color).isRGB() and (face.*color).isRGB() and (face.*color).a != 255)