lsp: Remove the PostLoadBehavior

We always update if we have a UI and we never update if not. So this
flag does not help.
This commit is contained in:
Tobias Hunger 2023-09-01 11:37:46 +02:00 committed by Olivier Goffart
parent df86bf67af
commit 55cc1ae31f
5 changed files with 23 additions and 40 deletions

View file

@ -394,16 +394,13 @@ pub fn show_preview_command(params: &[serde_json::Value], ctx: &Rc<Context>) ->
params.get(1).and_then(|v| v.as_str()).filter(|v| !v.is_empty()).map(|v| v.to_string());
let path = uri_to_file(&url).unwrap_or_default();
ctx.preview.load_preview(
crate::common::PreviewComponent {
path,
component,
include_paths: config.include_paths.clone(),
library_paths: config.library_paths.clone(),
style: config.style.clone().unwrap_or_default(),
},
crate::common::PostLoadBehavior::ShowAfterLoad,
);
ctx.preview.load_preview(crate::common::PreviewComponent {
path,
component,
include_paths: config.include_paths.clone(),
library_paths: config.library_paths.clone(),
style: config.style.clone().unwrap_or_default(),
});
Ok(())
}