edit predictions: Fix manually requesting completions (cherry-pick #24860) (#24869)

gcp-cherry-pick-bot[bot] and Agus Zubiaga created

Cherry-picked edit predictions: Fix manually requesting completions
(#24860)

We were disabling edit predictions altogether when
`show_edit_predictions` was set to `false`. However, even in that case,
`editor::ShowEditPrediction` is supposed to let your request a
prediction manually.

Release Notes:

- Fixed `editor::ShowEditPrediction` when `show_edit_predictions` is set
to `false`.

Co-authored-by: Agus Zubiaga <agus@zed.dev>

Change summary

crates/editor/src/editor.rs | 14 --------------
1 file changed, 14 deletions(-)

Detailed changes

crates/editor/src/editor.rs 🔗

@@ -504,15 +504,6 @@ enum EditPredictionSettings {
     },
 }
 
-impl EditPredictionSettings {
-    pub fn is_enabled(&self) -> bool {
-        match self {
-            EditPredictionSettings::Disabled => false,
-            EditPredictionSettings::Enabled { .. } => true,
-        }
-    }
-}
-
 enum InlineCompletionHighlight {}
 
 pub enum MenuInlineCompletionsPolicy {
@@ -5314,11 +5305,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);