forked from qt-creator/qt-creator
Editor: fix inserting snippet selections
Fixes: QTCREATORBUG-30071 Change-Id: Ie4156b4b123fc342ed752c7c1ff353e7fb4797db Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -86,7 +86,7 @@ void TextEditorOverlay::addOverlaySelection(int begin, int end,
|
|||||||
const auto it = std::find_if(m_selections.cbegin(),
|
const auto it = std::find_if(m_selections.cbegin(),
|
||||||
m_selections.cend(),
|
m_selections.cend(),
|
||||||
[&](const OverlaySelection &selection) {
|
[&](const OverlaySelection &selection) {
|
||||||
return begin > selection.m_cursor_begin.position();
|
return selection.m_cursor_begin.position() > begin;
|
||||||
});
|
});
|
||||||
m_selections.insert(it, selection);
|
m_selections.insert(it, selection);
|
||||||
update();
|
update();
|
||||||
|
Reference in New Issue
Block a user