python: Fix toolchains not getting picked up after workspace deserialization (#20488)
Closes #20476 Release Notes: - Fixed a bug in toolchain selector that caused it to not pick up venvs for tabs before user interacted with them. - Fixed a bug in language selector that caused it to pick up Markdown as the language for a buffer up until the tab was interacted with.
This commit is contained in:
parent
be8cc1146a
commit
45bbfe077a
2 changed files with 9 additions and 18 deletions
|
@ -66,7 +66,7 @@ impl StatusItemView for ActiveBufferLanguage {
|
|||
active_pane_item: Option<&dyn ItemHandle>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
if let Some(editor) = active_pane_item.and_then(|item| item.act_as::<Editor>(cx)) {
|
||||
if let Some(editor) = active_pane_item.and_then(|item| item.downcast::<Editor>()) {
|
||||
self._observe_active_editor = Some(cx.observe(&editor, Self::update_language));
|
||||
self.update_language(editor, cx);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue