Always provide default task context (#10764)

Based on
https://github.com/zed-industries/zed/issues/8324?notification_referrer_id=NT_kwDOACkO1bI5NTk0NjM0NzkyOjI2OTA3NzM&notifications_query=repo%3Azed-industries%2Fzed+is%3Aunread#issuecomment-2065551553

Release Notes:

- Fixed certain files' task modal not showing context-based tasks
This commit is contained in:
Kirill Bulatov 2024-04-19 10:51:50 +03:00 committed by GitHub
parent 9863b920b0
commit 222034cacf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 106 additions and 20 deletions

View file

@ -168,8 +168,8 @@ fn task_context(workspace: &Workspace, cx: &mut WindowContext<'_>) -> TaskContex
let language_context_provider = buffer
.read(cx)
.language()
.and_then(|language| language.context_provider())?;
.and_then(|language| language.context_provider())
.unwrap_or_else(|| Arc::new(BasicContextProvider));
let selection_range = selection.range();
let start = editor_snapshot
.display_snapshot