Make ":w" work in fakevim without needing a filename to be specified when file is not new.

Unfortunately, the "this file has been edited outside of Qt Creator" dialog pops up.
This commit is contained in:
Fred Emmott
2009-01-13 23:12:54 +00:00
parent 278ff78040
commit 3d3ff54ddf

View File

@@ -35,6 +35,8 @@
#include "fakevimconstants.h"
#include <texteditor/basetexteditor.h>
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QObject>
@@ -1485,6 +1487,9 @@ void FakeVimHandler::Private::setWidget(QWidget *ob)
{
m_textedit = qobject_cast<QTextEdit *>(ob);
m_plaintextedit = qobject_cast<QPlainTextEdit *>(ob);
TextEditor::BaseTextEditor* editor = qobject_cast<TextEditor::BaseTextEditor*>(ob);
if (editor)
m_currentFileName = editor->file()->fileName();
}
///////////////////////////////////////////////////////////////////////