Fixes: fakevim: small code simplification

Details:  re-use lineForPosition
This commit is contained in:
hjk
2009-03-04 14:19:39 +01:00
parent 08d0b03e70
commit 5c72306415

View File

@@ -1441,9 +1441,7 @@ int FakeVimHandler::Private::readLineCode(QString &cmd)
return -1;
}
cmd = cmd.mid(1);
QTextCursor tc = m_tc;
tc.setPosition(mark);
return tc.block().blockNumber() + 1;
return lineForPosition(mark);
}
if (c == '-') {
int n = readLineCode(cmd);