aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Humpula <michal.humpula@seznam.cz>2013-12-31 16:26:02 (GMT)
committerMichal Humpula <michal.humpula@seznam.cz>2014-01-19 12:01:16 (GMT)
commit001dac5b457fca84ea9872fd9e5ebc8262942630 (patch)
tree252f08c9f50415936b5d27dfd3e99424f285f808
parent5562332777f35d0885c208a03c0c1086b656467f (diff)
make find previous button in searchbar in vi-mode work
REVIEW: 114763 BUG: 329468
-rw-r--r--part/search/katesearchbar.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/part/search/katesearchbar.cpp b/part/search/katesearchbar.cpp
index e435d47..0cd3ea9 100644
--- a/part/search/katesearchbar.cpp
+++ b/part/search/katesearchbar.cpp
@@ -590,6 +590,12 @@ bool KateSearchBar::find(SearchDirection searchDirection, const QString * replac
KateMatch match(m_view->doc(), enabledOptions);
Range afterReplace = Range::invalid();
+ // FIXME: in KF5 remove dependency on viInputMode
+ if (m_view->viInputMode() && searchDirection == SearchBackward) {
+ const Cursor end(inputRange.end().line(), inputRange.end().column() - 1);
+ inputRange.setRange(inputRange.start(), end);
+ }
+
// Find, first try
match.searchText(inputRange, searchPattern());
if (match.isValid() && match.range() == selection) {