small fix for ~ at end of line

This commit is contained in:
hjk
2008-12-25 22:29:22 +01:00
committed by Roberto Raggi
parent 3ae0265363
commit fe261f0a90

View File

@@ -403,7 +403,7 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
finishMovement();
} else if (key == 'z') {
m_submode = ZSubMode;
} else if (key == '~') {
} else if (key == '~' && !atEol()) {
m_tc.movePosition(Right, KeepAnchor, qMin(count(), rightDist()));
QString str = m_tc.selectedText();
for (int i = str.size(); --i >= 0; ) {