diff --git a/src/plugins/fakevim/fakevim_test.cpp b/src/plugins/fakevim/fakevim_test.cpp index 5173884857f..0aad5370fb7 100644 --- a/src/plugins/fakevim/fakevim_test.cpp +++ b/src/plugins/fakevim/fakevim_test.cpp @@ -1339,6 +1339,15 @@ void FakeVimPlugin::test_vim_block_selection() KEYS("u", "\"" X "abc\"\"def\""); KEYS("", "\"" X "\"\"def\""); + /* QTCREATORBUG-12128 */ + data.setText("abc \"def\" ghi \"jkl\" mno"); + KEYS("di\"", "abc \"" X "\" ghi \"jkl\" mno"); + KEYS("u", "abc \"" X "def\" ghi \"jkl\" mno"); + KEYS("3l" "di\"", "abc \"" X "\" ghi \"jkl\" mno"); + KEYS("di\"", "abc \"" X "\" ghi \"jkl\" mno"); + KEYS("tj" "di\"", "abc \"\" ghi \"" X "\" mno"); + KEYS("l" "di\"", "abc \"\" ghi \"\"" X " mno"); + NOT_IMPLEMENTED // quoted string with escaped character data.setText("\"abc\""); diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index aebf366fe1b..fd91f273aa0 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -8229,7 +8229,7 @@ bool FakeVimHandler::Private::selectQuotedStringTextObject(bool inner, QTextCursor tc2(document()); while (tc2 <= tc) { tc1 = document()->find(quote, tc2); - if (tc1.isNull() || tc1.anchor() > tc.position()) + if (tc1.isNull()) return false; tc2 = document()->find(quote, tc1); if (tc2.isNull())