FakeVim: C-h in insert mode acts like backspace

In insert mode:
input:  xyz|
keys:   C-h
result: xy|

Change-Id: I6832787683485be3031b1d9ff55d459cb25b74b4
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Thorben Kroeger
2015-03-22 11:21:28 +01:00
committed by hjk
parent 430914b478
commit 161c07f605

View File

@@ -4953,7 +4953,8 @@ void FakeVimHandler::Private::handleInsertMode(const Input &input)
endEditBlock();
}
} else if (input.isBackspace()) {
if (!handleInsertInEditor(input)) {
// pass C-h as backspace, too
if (!handleInsertInEditor(Input(Qt::Key_Backspace, Qt::NoModifier))) {
joinPreviousEditBlock();
if (!m_buffer->lastInsertion.isEmpty()
|| hasConfig(ConfigBackspace, "start")