summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Haumann <dhaumann@kde.org>2014-01-21 12:35:00 (GMT)
committerDominik Haumann <dhaumann@kde.org>2014-01-21 12:35:14 (GMT)
commit754f23797b176422875c846522e1404618b77c13 (patch)
tree26c6994d79f81a5387d71b3e92305de47312036b
parent6d4b8dd991d936a6ad30be52dda9544e18aba603 (diff)
ctrl+h: set cursor position to end of selection
-rw-r--r--src/search/katesearchbar.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/search/katesearchbar.cpp b/src/search/katesearchbar.cpp
index 9f6c6d8..b415138 100644
--- a/src/search/katesearchbar.cpp
+++ b/src/search/katesearchbar.cpp
@@ -1234,7 +1234,10 @@ void KateSearchBar::onPowerModeChanged(int /*index*/)
} else {
// Select current word so we can search for that the next time
const Cursor cursorPos = view->cursorPosition();
- view->selectWord(cursorPos);
+ KTextEditor::Range wordRange = view->document()->wordRangeAt(cursorPos);
+ if (wordRange.isValid()) {
+ selectRange(view, wordRange);
+ }
}
}