Commit 02eaf147 authored by Bojan Petrovic's avatar Bojan Petrovic Committed by Leandro Melo
Browse files

Text Editor: Fix handling of snippet parameter with no name



Problem was that typing into overlay selection of the snippet
parameter with no name ended the snippet editing. For example,
"do {$$} while ($confition$);" was unusable.

Change-Id: Ife0e68340de328a3492e242ce861f7c9dd225d7e
Reviewed-by: default avatarLeandro Melo <leandro.melo@nokia.com>
parent 71730cf7
......@@ -95,9 +95,7 @@ void TextEditorOverlay::addOverlaySelection(int begin, int end,
selection.m_cursor_end = QTextCursor(document->docHandle(), end);
if (overlaySelectionFlags & ExpandBegin) {
if (begin > 0 && begin < end) { // not empty
selection.m_cursor_begin.setKeepPositionOnInsert(true);
}
selection.m_cursor_begin.setKeepPositionOnInsert(true);
}
if (overlaySelectionFlags & LockSize)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment