forked from qt-creator/qt-creator
fakevim: fix indentation of first line after >iB and >ib
http://bugreports.qt.nokia.com/browse/QTCREATORBUG-2015
This commit is contained in:
@@ -4704,7 +4704,9 @@ void FakeVimHandler::Private::selectBlockTextObject(bool inner, char left, char
|
|||||||
QTextCursor tc1 = doc->find(sleft, m_tc, QTextDocument::FindBackward);
|
QTextCursor tc1 = doc->find(sleft, m_tc, QTextDocument::FindBackward);
|
||||||
if (tc1.isNull())
|
if (tc1.isNull())
|
||||||
return;
|
return;
|
||||||
const int p1 = tc1.position() + inner - sleft.size();
|
int p1 = tc1.position() + inner - sleft.size();
|
||||||
|
if (inner && m_tc.document()->characterAt(p1) == ParagraphSeparator)
|
||||||
|
++p1;
|
||||||
const int p2 = tc2.position() - inner - sright.size();
|
const int p2 = tc2.position() - inner - sright.size();
|
||||||
setMark('>', p1);
|
setMark('>', p1);
|
||||||
m_anchor = p2;
|
m_anchor = p2;
|
||||||
|
|||||||
Reference in New Issue
Block a user