fakevim: distinquish :q and :q!

javascripteditor: compile fix Linux, compile fix namespaces
This commit is contained in:
hjk
2009-03-31 11:53:42 +02:00
parent aedeadf01b
commit c3b3bd121a
5 changed files with 14 additions and 23 deletions

View File

@@ -296,7 +296,6 @@ private:
void notImplementedYet();
void updateMiniBuffer();
void updateSelection();
void quit();
QWidget *editor() const;
QChar characterAtCursor() const
{ return m_tc.document()->characterAt(m_tc.position()); }
@@ -479,7 +478,6 @@ EventResult FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
KEY_DEBUG("PASSING PLAIN KEY..." << ev->key() << ev->text());
//if (key == ',') { // use ',,' to leave, too.
// qDebug() << "FINISHED...";
// quit();
// return EventHandled;
//}
m_passing = false;
@@ -1696,7 +1694,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0)
enterCommandMode();
} else if (cmd == "q!" || cmd == "q") { // :q
showBlackMessage(QString());
quit();
q->quitRequested(cmd == "q!");
} else if (reDelete.indexIn(cmd) != -1) { // :d
selectRange(beginLine, endLine);
QString reg = reDelete.cap(2);
@@ -2454,13 +2452,6 @@ void FakeVimHandler::Private::enterExMode()
m_mode = ExMode;
}
void FakeVimHandler::Private::quit()
{
EDITOR(setCursorWidth(m_cursorWidth));
EDITOR(setOverwriteMode(false));
q->quitRequested();
}
void FakeVimHandler::Private::recordJump()
{
m_jumpListUndo.append(position());
@@ -2533,11 +2524,6 @@ void FakeVimHandler::handleCommand(const QString &cmd)
d->handleExCommand(cmd);
}
void FakeVimHandler::quit()
{
d->quit();
}
void FakeVimHandler::setCurrentFileName(const QString &fileName)
{
d->m_currentFileName = fileName;