Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix current lsp logs menu item not shown as selected

Kirill Bulatov12b5dbff68eb
diff --git a/crates/language_tools/src/lsp_log.rs b/crates/language_tools/src/lsp_log.rs
index 123149eae2e..e3718267582 100644
--- a/crates/language_tools/src/lsp_log.rs
+++ b/crates/language_tools/src/lsp_log.rs
@@ -772,9 +772,10 @@ impl Render for LspLogToolbarItemView {
}),
);
if server_selected && row.logs_selected {
+ let selected_ix = menu.select_last();
debug_assert_eq!(
Some(ix * 3 + 1),
- menu.select_last(),
+ selected_ix,
"Could not scroll to a just added LSP menu item"
);
}
@@ -822,9 +823,10 @@ impl Render for LspLogToolbarItemView {
}),
);
if server_selected && row.rpc_trace_selected {
+ let selected_ix = menu.select_last();
debug_assert_eq!(
Some(ix * 3 + 2),
- menu.select_last(),
+ selected_ix,
"Could not scroll to a just added LSP menu item"
);
}