aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 7638317b7..da15e0d4e 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -503,6 +503,17 @@ ColourDesired ViewStyle::WrapColour() const noexcept {
return styles[STYLE_DEFAULT].fore;
}
+// Insert new edge in sorted order.
+void ViewStyle::AddMultiEdge(uptr_t wParam, sptr_t lParam) {
+ const int column = static_cast<int>(wParam);
+ theMultiEdge.insert(
+ std::upper_bound(theMultiEdge.begin(), theMultiEdge.end(), column,
+ [](const EdgeProperties &a, const EdgeProperties &b) {
+ return a.column < b.column;
+ }),
+ EdgeProperties(column, lParam));
+}
+
bool ViewStyle::SetWrapState(int wrapState_) noexcept {
WrapMode wrapStateWanted;
switch (wrapState_) {