Commit 800c466e authored by Mark Nauwelaerts's avatar Mark Nauwelaerts Committed by Christoph Cullmann
Browse files

lspclient: use common helper to apply additional completion edits

parent a40d83eb
Pipeline #136851 passed with stage
in 3 minutes and 36 seconds
......@@ -6,6 +6,7 @@
#include "lspclientcompletion.h"
#include "lspclientplugin.h"
#include "lspclientutils.h"
#include "lspclient_debug.h"
......@@ -435,9 +436,9 @@ public:
}
if (m_autoImport) {
for (const auto &textEdit : additionalTextEdits) {
view->document()->insertText(textEdit.range.start(), textEdit.newText);
}
// re-use util to apply edits
// (which takes care to use moving range, etc)
applyEdits(view->document(), nullptr, additionalTextEdits);
}
}
......
Markdown is supported
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