aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-08-25 10:02:28 +1000
committerNeil <nyamatongwe@gmail.com>2020-08-25 10:02:28 +1000
commitb381c8fd700c2cf80e49ea77c6a5f1a3281bc3f5 (patch)
tree69c4e5d396a94be21ea09f94d14d175f4763163d /src/ViewStyle.cxx
parent9ec5dc184d3095ea6c091ecd326e459c7caf2ca7 (diff)
downloadscintilla-mirror-b381c8fd700c2cf80e49ea77c6a5f1a3281bc3f5.tar.gz
Backport: Move SCI_MULTIEDGEADDLINE impleemntation into ViewStyle as it is too complex for
switch case in Editor. Backport of changeset 8508:03c67a051370.
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_) {