fakevim: fix indentation of first line after >iB and >ib

http://bugreports.qt.nokia.com/browse/QTCREATORBUG-2015
This commit is contained in:
hjk
2010-08-11 12:07:05 +02:00
parent 99adbf1582
commit a40094c99f

View File

@@ -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;