editor: Fix edit_predictions_disabled_in
not disabling predictions (#36469)
Closes #25744 Only setting changes and editor init determined whether to show predictions, so glob patterns and toggles correctly disabled them. On cursor changes we call `update_visible_edit_prediction`, but we weren’t discarding predictions when the scope changed. This PR fixes that. Release Notes: - Fixed an issue where the `edit_predictions_disabled_in` setting was ignored in some cases.
This commit is contained in:
parent
b8ddb0141c
commit
47e1d4511c
2 changed files with 49 additions and 1 deletions
|
@ -7764,6 +7764,14 @@ impl Editor {
|
|||
self.edit_prediction_settings =
|
||||
self.edit_prediction_settings_at_position(&buffer, cursor_buffer_position, cx);
|
||||
|
||||
match self.edit_prediction_settings {
|
||||
EditPredictionSettings::Disabled => {
|
||||
self.discard_edit_prediction(false, cx);
|
||||
return None;
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
|
||||
self.edit_prediction_indent_conflict = multibuffer.is_line_whitespace_upto(cursor);
|
||||
|
||||
if self.edit_prediction_indent_conflict {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue