Commit c50877f8 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

LSP Rename: add word under cursor to input line

parent abfbf47b
Pipeline #70267 passed with stage
in 5 minutes and 45 seconds
...@@ -1927,6 +1927,11 @@ public: ...@@ -1927,6 +1927,11 @@ public:
return; return;
} }
QString wordUnderCursor = document->wordAt(activeView->cursorPosition());
if (wordUnderCursor.isEmpty()) {
return;
}
bool ok = false; bool ok = false;
// results are typically (too) limited // results are typically (too) limited
// due to server implementation or limited view/scope // due to server implementation or limited view/scope
...@@ -1935,7 +1940,7 @@ public: ...@@ -1935,7 +1940,7 @@ public:
i18nc("@title:window", "Rename"), i18nc("@title:window", "Rename"),
i18nc("@label:textbox", "New name (caution: not all references may be replaced)"), i18nc("@label:textbox", "New name (caution: not all references may be replaced)"),
QLineEdit::Normal, QLineEdit::Normal,
QString(), wordUnderCursor,
&ok); &ok);
if (!ok) { if (!ok) {
return; return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment