summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Humpula <michal.humpula@seznam.cz>2014-01-26 15:41:21 (GMT)
committerMichal Humpula <michal.humpula@seznam.cz>2014-01-26 15:41:21 (GMT)
commitb0e0f4550cc2ef0d0f7109ccea79283879190208 (patch)
tree9443d71b5e716a1f214ecd1ee13f518dc61d85dd
parent049ebc158952a84f711bcdae3eefe266396cb000 (diff)
vi-mode: fix visual mode tests
ViModeEmulatedCommandBar is now default. When calling resetViInputModeManger it makes sense to ensure that viModeEmulatedCommandBar is hidden, so the tests wont start typing in command bar. CCMAIL: <mikisabate@gmail.com>
-rw-r--r--autotests/src/vimode_test.cpp26
-rw-r--r--src/view/kateview.cpp3
2 files changed, 14 insertions, 15 deletions
diff --git a/autotests/src/vimode_test.cpp b/autotests/src/vimode_test.cpp
index 8763aba..9deb552 100644
--- a/autotests/src/vimode_test.cpp
+++ b/autotests/src/vimode_test.cpp
@@ -743,21 +743,17 @@ void ViModeTest::VisualModeTests()
// BUG #328277 - make sure kate doesn't crash
DoTest("aaa\nbbb", "Vj>u>.", " aaa\n bbb", ShouldFail, "Crash is fixed, but correct repeat behaviour in this scenario is yet to be implemented");
- // Selection with regular motions.
- // TODO: these tests are now failing in ktexteditor.git but not in kate.git master.
- // If I open KWrite and type the exact commands, I can see them working as expected.
- // I'll try to fix this asap.
-// DoTest("Three. Different. Sentences.", "v)cX", "Xifferent. Sentences.");
-// DoTest("Three. Different. Sentences.", "v)cX", "Xifferent. Sentences.");
-// DoTest("Three. Different. Sentences.", "v)cX", "Xifferent. Sentences.");
-// DoTest("Three. Different. Sentences.", "viWcX", "X Different. Sentences.");
-// DoTest("Three. Different. Sentences.", "viwcX", "X. Different. Sentences.");
-// DoTest("Three. Different. Sentences.", "vaWcX", "XDifferent. Sentences.");
-// DoTest("Three. Different. Sentences.", "vawcX", "X. Different. Sentences.");
-// DoTest("Three. Different. Sentences.", "vascX", "XDifferent. Sentences.");
-// DoTest("Three. Different. Sentences.", "viscX", "X Different. Sentences.");
-// DoTest("Three. Different. Sentences.", "vapcX", "X");
-// DoTest("Three. Different. Sentences.", "vipcX", "X");
+ DoTest("Three. Different. Sentences.", "v)cX", "Xifferent. Sentences.");
+ DoTest("Three. Different. Sentences.", "v)cX", "Xifferent. Sentences.");
+ DoTest("Three. Different. Sentences.", "v)cX", "Xifferent. Sentences.");
+ DoTest("Three. Different. Sentences.", "viWcX", "X Different. Sentences.");
+ DoTest("Three. Different. Sentences.", "viwcX", "X. Different. Sentences.");
+ DoTest("Three. Different. Sentences.", "vaWcX", "XDifferent. Sentences.");
+ DoTest("Three. Different. Sentences.", "vawcX", "X. Different. Sentences.");
+ DoTest("Three. Different. Sentences.", "vascX", "XDifferent. Sentences.");
+ DoTest("Three. Different. Sentences.", "viscX", "X Different. Sentences.");
+ DoTest("Three. Different. Sentences.", "vapcX", "X");
+ DoTest("Three. Different. Sentences.", "vipcX", "X");
}
void ViModeTest::ReplaceModeTests()
diff --git a/src/view/kateview.cpp b/src/view/kateview.cpp
index d130363..6040eac 100644
--- a/src/view/kateview.cpp
+++ b/src/view/kateview.cpp
@@ -1578,6 +1578,9 @@ KateViInputModeManager *KTextEditor::ViewPrivate::getViInputModeManager()
KateViInputModeManager *KTextEditor::ViewPrivate::resetViInputModeManager()
{
+ if (m_viModeEmulatedCommandBar) {
+ m_viModeEmulatedCommandBar->hideMe();
+ }
return m_viewInternal->resetViInputModeManager();
}