Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

edit predictions: Fix manually requesting completions (#24860)

Agus Zubiaga8d839fca0642
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index d054038fdf6..c2b56dc2b12 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -510,15 +510,6 @@ enum EditPredictionSettings {
},
}
-impl EditPredictionSettings {
- pub fn is_enabled(&self) -> bool {
- match self {
- EditPredictionSettings::Disabled => false,
- EditPredictionSettings::Enabled { .. } => true,
- }
- }
-}
-
enum InlineCompletionHighlight {}
pub enum MenuInlineCompletionsPolicy {
@@ -5327,11 +5318,6 @@ impl Editor {
self.edit_prediction_settings =
self.edit_prediction_settings_at_position(&buffer, cursor_buffer_position, cx);
- if !self.edit_prediction_settings.is_enabled() {
- self.discard_inline_completion(false, cx);
- return None;
- }
-
self.edit_prediction_cursor_on_leading_whitespace =
multibuffer.is_line_whitespace_upto(cursor);