Add caching of parsed completion documentation markdown to reduce flicker when selecting (#31546)
Related to #31460 and #28635. Release Notes: - Fixed redraw delay of documentation from language server completions and added caching to reduce flicker when using arrow keys to change selection.
This commit is contained in:
parent
31d908fc74
commit
506beafe10
8 changed files with 300 additions and 95 deletions
|
@ -67,14 +67,8 @@ struct MarkdownExample {
|
|||
|
||||
impl MarkdownExample {
|
||||
pub fn new(text: SharedString, language_registry: Arc<LanguageRegistry>, cx: &mut App) -> Self {
|
||||
let markdown = cx.new(|cx| {
|
||||
Markdown::new(
|
||||
text,
|
||||
Some(language_registry),
|
||||
Some("TypeScript".to_string()),
|
||||
cx,
|
||||
)
|
||||
});
|
||||
let markdown = cx
|
||||
.new(|cx| Markdown::new(text, Some(language_registry), Some("TypeScript".into()), cx));
|
||||
Self { markdown }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue