forked from qt-creator/qt-creator
Fix dot command for pasting with 'P' being 'p'
Change-Id: Ic491f3a198a03fd08a680e044c4e8f2f5ebe2866 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -2534,6 +2534,8 @@ void FakeVimPlugin::test_vim_copy_paste()
|
|||||||
KEYS("yy", "abc" N "abc" N X "def" N "ghi");
|
KEYS("yy", "abc" N "abc" N X "def" N "ghi");
|
||||||
KEYS("\"xp", "abc" N "abc" N "def" N X "abc" N "ghi");
|
KEYS("\"xp", "abc" N "abc" N "def" N X "abc" N "ghi");
|
||||||
KEYS(".", "abc" N "abc" N "def" N "abc" N X "abc" N "ghi");
|
KEYS(".", "abc" N "abc" N "def" N "abc" N X "abc" N "ghi");
|
||||||
|
KEYS("\"xP", "abc" N "abc" N "def" N "abc" N X "abc" N "abc" N "ghi");
|
||||||
|
KEYS(".", "abc" N "abc" N "def" N "abc" N X "abc" N "abc" N "abc" N "ghi");
|
||||||
|
|
||||||
// delete to black hole register
|
// delete to black hole register
|
||||||
data.setText("aaa bbb ccc");
|
data.setText("aaa bbb ccc");
|
||||||
|
@@ -4700,7 +4700,7 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input)
|
|||||||
} else if (input.isControl('o')) {
|
} else if (input.isControl('o')) {
|
||||||
jump(-count());
|
jump(-count());
|
||||||
} else if (input.is('p') || input.is('P') || input.isShift(Qt::Key_Insert)) {
|
} else if (input.is('p') || input.is('P') || input.isShift(Qt::Key_Insert)) {
|
||||||
dotCommand = QString("\"%1%2p").arg(QChar(m_register)).arg(count());
|
dotCommand = QString("\"%1%2%3").arg(QChar(m_register)).arg(count()).arg(input.asChar());
|
||||||
|
|
||||||
pasteText(!input.is('P'));
|
pasteText(!input.is('P'));
|
||||||
setTargetColumn();
|
setTargetColumn();
|
||||||
|
Reference in New Issue
Block a user