aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.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
commit24ba9ee47bb8535f44fbaa7d36f18cfda53eaf44 (patch)
treec5d1055300754c76fcc6ce3c3fabb5ff0a8692c2 /src/Editor.cxx
parent2117f9e7b583e9093b6b297f8782027098320496 (diff)
downloadscintilla-mirror-24ba9ee47bb8535f44fbaa7d36f18cfda53eaf44.tar.gz
Move SCI_MULTIEDGEADDLINE impleemntation into ViewStyle as it is too complex for
switch case in Editor.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index cfd9e150e..01ab6f0a5 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7704,18 +7704,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
InvalidateStyleRedraw();
break;
- case SCI_MULTIEDGEADDLINE: {
- // Insert new edge in sorted order.
- const int column = static_cast<int>(wParam);
- vs.theMultiEdge.insert(
- std::upper_bound(vs.theMultiEdge.begin(), vs.theMultiEdge.end(), column,
- [](const EdgeProperties &a, const EdgeProperties &b) {
- return a.column < b.column;
- }),
- EdgeProperties(wParam, lParam));
- InvalidateStyleRedraw();
- break;
- }
+ case SCI_MULTIEDGEADDLINE:
+ vs.AddMultiEdge(wParam, lParam);
+ InvalidateStyleRedraw();
+ break;
case SCI_MULTIEDGECLEARALL:
std::vector<EdgeProperties>().swap(vs.theMultiEdge); // Free vector and memory, C++03 compatible