edit predictions: Cache settings across renders (#24581)
We were reading edit prediction settings too often, causing frames to be dropped. We'll now cache them and update them from `update_visible_inline_completion`. Release Notes: - N/A
This commit is contained in:
@@ -708,7 +708,7 @@ impl LspLogView {
|
||||
editor.set_text(log_contents, window, cx);
|
||||
editor.move_to_end(&MoveToEnd, window, cx);
|
||||
editor.set_read_only(true);
|
||||
editor.set_show_inline_completions(Some(false), window, cx);
|
||||
editor.set_show_edit_predictions(Some(false), window, cx);
|
||||
editor.set_soft_wrap_mode(SoftWrap::EditorWidth, cx);
|
||||
editor
|
||||
});
|
||||
@@ -751,7 +751,7 @@ impl LspLogView {
|
||||
);
|
||||
editor.set_text(server_info, window, cx);
|
||||
editor.set_read_only(true);
|
||||
editor.set_show_inline_completions(Some(false), window, cx);
|
||||
editor.set_show_edit_predictions(Some(false), window, cx);
|
||||
editor.set_soft_wrap_mode(SoftWrap::EditorWidth, cx);
|
||||
editor
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user