Commit 566dfd8d authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

lspclient: only consider user configuration contents changes as change

... whereas format highlight changes should not be considered

BUG: 427084
parent a3165104
...@@ -77,7 +77,15 @@ LSPClientConfigPage::LSPClientConfigPage(QWidget *parent, LSPClientPlugin *plugi ...@@ -77,7 +77,15 @@ LSPClientConfigPage::LSPClientConfigPage(QWidget *parent, LSPClientPlugin *plugi
connect(ui->spinDiagnosticsSize, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, ch); connect(ui->spinDiagnosticsSize, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, ch);
connect(ui->edtConfigPath, &KUrlRequester::textChanged, this, &LSPClientConfigPage::configUrlChanged); connect(ui->edtConfigPath, &KUrlRequester::textChanged, this, &LSPClientConfigPage::configUrlChanged);
connect(ui->edtConfigPath, &KUrlRequester::urlSelected, this, &LSPClientConfigPage::configUrlChanged); connect(ui->edtConfigPath, &KUrlRequester::urlSelected, this, &LSPClientConfigPage::configUrlChanged);
connect(ui->userConfig, &QTextEdit::textChanged, this, &LSPClientConfigPage::configTextChanged);
auto cfgh = [this](int position, int added, int removed) {
Q_UNUSED(position);
// discard format change
// (e.g. due to syntax highlighting)
if (added || removed)
configTextChanged();
};
connect(ui->userConfig->document(), &QTextDocument::contentsChange, this, cfgh);
// custom control logic // custom control logic
auto h = [this]() { auto h = [this]() {
......
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