Commit 3d3ff54d authored by Fred Emmott's avatar Fred Emmott
Browse files

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.
parent 278ff780
......@@ -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();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment