From d95d6da884b91531b0f3e87814c1e316d03ddcef Mon Sep 17 00:00:00 2001 From: fengqi <362254883@qq.com> Date: Thu, 1 Aug 2024 22:39:06 +0800 Subject: [PATCH] Call the appropriate method --- lapce-app/src/doc.rs | 4 ++-- lapce-app/src/window_tab.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lapce-app/src/doc.rs b/lapce-app/src/doc.rs index 177b3b7563..808072cb5c 100644 --- a/lapce-app/src/doc.rs +++ b/lapce-app/src/doc.rs @@ -626,7 +626,7 @@ impl Doc { self.buffer.with_untracked(|b| b.line_ending()) } - pub fn on_update(&self, edits: Option>) { + fn on_update(&self, edits: Option>) { batch(|| { self.trigger_syntax_change(edits); self.trigger_head_change(); @@ -800,7 +800,7 @@ impl Doc { } /// Request semantic styles for the buffer from the LSP through the proxy. - fn get_semantic_styles(&self) { + pub fn get_semantic_styles(&self) { if !self.loaded() { return; } diff --git a/lapce-app/src/window_tab.rs b/lapce-app/src/window_tab.rs index 9aecba1798..049783353c 100644 --- a/lapce-app/src/window_tab.rs +++ b/lapce-app/src/window_tab.rs @@ -1926,7 +1926,8 @@ impl WindowTabData { // todo filter by language self.main_split.docs.with_untracked(|x| { for doc in x.values() { - doc.on_update(None); + doc.get_code_lens(); + doc.get_semantic_styles(); } }); }