FakeVim: Expand ~ in some file names

For :read and :source.

Task-number: QTCREATORBUG-11160
Change-Id: I636593a16f9e39c25585c221c5d978e842f4c1d4
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2016-06-03 13:00:51 +02:00
parent 6d9782845f
commit 40a9463c56
2 changed files with 12 additions and 4 deletions

View File

@@ -1977,7 +1977,7 @@ void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
editor->setFocus();
*handled = true;
if (cmd.matches("w", "write") || cmd.cmd == "wq") {
if ((cmd.matches("w", "write") || cmd.cmd == "wq") && cmd.args.isEmpty()) {
// :w[rite]
IEditor *editor = m_editorToHandler.key(handler);
const QString fileName = handler->currentFileName();