aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/texteditoractionhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/texteditor/texteditoractionhandler.cpp')
-rw-r--r--src/plugins/texteditor/texteditoractionhandler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp
index 5043583a469..9da54ddc10c 100644
--- a/src/plugins/texteditor/texteditoractionhandler.cpp
+++ b/src/plugins/texteditor/texteditoractionhandler.cpp
@@ -362,9 +362,11 @@ void TextEditorActionHandler::gotoAction()
{
Locator::LocatorManager *locatorManager = Locator::LocatorManager::instance();
QTC_ASSERT(locatorManager, return);
- const QString shortcut = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString();
- const QString text = tr(" <line number>");
- locatorManager->show(shortcut + text, 2, text.length()-1);
+ QString locatorString = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString();
+ locatorString += QLatin1Char(' ');
+ const int selectionStart = locatorString.size();
+ locatorString += tr("<line number>");
+ locatorManager->show(locatorString, selectionStart, locatorString.size() - selectionStart);
}
void TextEditorActionHandler::printAction()