edit predictions: Disable "This Buffer" option when disabled for language (#25566)

![image](https://github.com/user-attachments/assets/7b888c7d-a1e9-4d0b-ba6d-9a41916acf79)


Release Notes:

- edit prediction: Disable "This Buffer" option when predictions are
disabled for its language
This commit is contained in:
Agus Zubiaga
2025-02-25 15:41:13 +00:00
committed by GitHub
parent 21fc3c07b6
commit 7075bd700f
4 changed files with 39 additions and 26 deletions
+2 -2
View File
@@ -307,9 +307,9 @@ impl Render for QuickActionBar {
let mut inline_completion_entry = ContextMenuEntry::new("Edit Predictions")
.toggleable(IconPosition::Start, edit_predictions_enabled_at_cursor && show_edit_predictions)
.disabled(!edit_predictions_enabled_at_cursor)
.action(Some(
.action(
editor::actions::ToggleEditPrediction.boxed_clone(),
)).handler({
).handler({
let editor = editor.clone();
move |window, cx| {
editor