forked from qt-creator/qt-creator
whitespace fixes
This commit is contained in:
@@ -132,14 +132,14 @@ public:
|
|||||||
|
|
||||||
int lastPositionInDocument() const;
|
int lastPositionInDocument() const;
|
||||||
|
|
||||||
// all zero-based counting
|
// all zero-based counting
|
||||||
int cursorLineOnScreen() const;
|
int cursorLineOnScreen() const;
|
||||||
int linesOnScreen() const;
|
int linesOnScreen() const;
|
||||||
int columnsOnScreen() const;
|
int columnsOnScreen() const;
|
||||||
int cursorLineInDocument() const;
|
int cursorLineInDocument() const;
|
||||||
int cursorColumnInDocument() const;
|
int cursorColumnInDocument() const;
|
||||||
int linesInDocument() const;
|
int linesInDocument() const;
|
||||||
void scrollToLineInDocument(int line);
|
void scrollToLineInDocument(int line);
|
||||||
|
|
||||||
void moveToFirstNonBlankOnLine();
|
void moveToFirstNonBlankOnLine();
|
||||||
void moveToNextWord(bool simple);
|
void moveToNextWord(bool simple);
|
||||||
@@ -343,7 +343,7 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
|
|||||||
} else if (m_submode == ZSubMode) {
|
} else if (m_submode == ZSubMode) {
|
||||||
if (key == Key_Return) {
|
if (key == Key_Return) {
|
||||||
// cursor line to top of window, cursor on first non-blank
|
// cursor line to top of window, cursor on first non-blank
|
||||||
scrollToLineInDocument(cursorLineInDocument());
|
scrollToLineInDocument(cursorLineInDocument());
|
||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
finishMovement();
|
finishMovement();
|
||||||
} else {
|
} else {
|
||||||
@@ -961,30 +961,30 @@ void FakeVimHandler::Private::moveToNextWord(bool simple)
|
|||||||
|
|
||||||
int FakeVimHandler::Private::cursorLineOnScreen() const
|
int FakeVimHandler::Private::cursorLineOnScreen() const
|
||||||
{
|
{
|
||||||
QRect rect = EDITOR(cursorRect());
|
QRect rect = EDITOR(cursorRect());
|
||||||
return rect.y() / rect.height();
|
return rect.y() / rect.height();
|
||||||
}
|
}
|
||||||
|
|
||||||
int FakeVimHandler::Private::linesOnScreen() const
|
int FakeVimHandler::Private::linesOnScreen() const
|
||||||
{
|
{
|
||||||
QRect rect = EDITOR(cursorRect());
|
QRect rect = EDITOR(cursorRect());
|
||||||
return EDITOR(height()) / rect.height();
|
return EDITOR(height()) / rect.height();
|
||||||
}
|
}
|
||||||
|
|
||||||
int FakeVimHandler::Private::columnsOnScreen() const
|
int FakeVimHandler::Private::columnsOnScreen() const
|
||||||
{
|
{
|
||||||
QRect rect = EDITOR(cursorRect());
|
QRect rect = EDITOR(cursorRect());
|
||||||
return EDITOR(width()) / rect.width();
|
return EDITOR(width()) / rect.width();
|
||||||
}
|
}
|
||||||
|
|
||||||
int FakeVimHandler::Private::cursorLineInDocument() const
|
int FakeVimHandler::Private::cursorLineInDocument() const
|
||||||
{
|
{
|
||||||
return m_tc.block().blockNumber();
|
return m_tc.block().blockNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
int FakeVimHandler::Private::cursorColumnInDocument() const
|
int FakeVimHandler::Private::cursorColumnInDocument() const
|
||||||
{
|
{
|
||||||
return m_tc.position() - m_tc.block().position();
|
return m_tc.position() - m_tc.block().position();
|
||||||
}
|
}
|
||||||
|
|
||||||
int FakeVimHandler::Private::linesInDocument() const
|
int FakeVimHandler::Private::linesInDocument() const
|
||||||
@@ -994,9 +994,9 @@ int FakeVimHandler::Private::linesInDocument() const
|
|||||||
|
|
||||||
void FakeVimHandler::Private::scrollToLineInDocument(int line)
|
void FakeVimHandler::Private::scrollToLineInDocument(int line)
|
||||||
{
|
{
|
||||||
// FIXME: works only for QPlainTextEdit
|
// FIXME: works only for QPlainTextEdit
|
||||||
QScrollBar *scrollBar = EDITOR(verticalScrollBar());
|
QScrollBar *scrollBar = EDITOR(verticalScrollBar());
|
||||||
scrollBar->setValue(line);
|
scrollBar->setValue(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
int FakeVimHandler::Private::lastPositionInDocument() const
|
int FakeVimHandler::Private::lastPositionInDocument() const
|
||||||
|
|||||||
Reference in New Issue
Block a user