From a17b57fa16f36d889deec9cb2e5afe2ee4905a79 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Thu, 12 Mar 2009 15:04:50 +0100
Subject: [PATCH] Fixes: fakevim: fix positioning after df<x> Details: removes
 an old hack...

---
 src/plugins/fakevim/fakevimhandler.cpp | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index 52bd4ae3eb4..038283f3a01 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -1078,8 +1078,13 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
         m_moveType = MoveInclusive;
         moveToWordBoundary(true, true);
         finishMovement();
-    } else if (key == 'f' || key == 'F') {
+    } else if (key == 'f') {
         m_subsubmode = FtSubSubMode;
+        m_moveType = MoveInclusive;
+        m_subsubdata = key;
+    } else if (key == 'F') {
+        m_subsubmode = FtSubSubMode;
+        m_moveType = MoveExclusive;
         m_subsubdata = key;
     } else if (key == 'g') {
         if (m_gflag) {
@@ -1269,7 +1274,12 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
         m_opcount.clear();
         m_mvcount.clear();
         enterInsertMode();
-    } else if (key == 't' || key == 'T') {
+    } else if (key == 't') {
+        m_moveType = MoveInclusive;
+        m_subsubmode = FtSubSubMode;
+        m_subsubdata = key;
+    } else if (key == 'T') {
+        m_moveType = MoveExclusive;
         m_subsubmode = FtSubSubMode;
         m_subsubdata = key;
     } else if (key == 'u') {
@@ -1987,11 +1997,6 @@ void FakeVimHandler::Private::handleFfTt(int key)
                 --pos;
             else if (m_subsubdata == 'T')
                 ++pos;
-            // FIXME: strange correction...
-            if (m_submode == DeleteSubMode && m_subsubdata == 'f')
-                ++pos;
-            if (m_submode == DeleteSubMode && m_subsubdata == 't')
-                ++pos;
 
             if (forward)
                 m_tc.movePosition(Right, KeepAnchor, pos - m_tc.position());
-- 
GitLab