editor: Shrink DisplayMapSnapshot from 824 to 256 bytes (#39568)
We have unnecessary clones for the fields here as most of the snapshots contain the others hierarchically. Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -1539,7 +1539,8 @@ impl SearchableItem for Editor {
|
||||
|
||||
fn query_suggestion(&mut self, window: &mut Window, cx: &mut Context<Self>) -> String {
|
||||
let setting = EditorSettings::get_global(cx).seed_search_query_from_cursor;
|
||||
let snapshot = &self.snapshot(window, cx).buffer_snapshot;
|
||||
let snapshot = self.snapshot(window, cx);
|
||||
let snapshot = snapshot.buffer_snapshot();
|
||||
let selection = self.selections.newest_adjusted(cx);
|
||||
|
||||
match setting {
|
||||
|
||||
Reference in New Issue
Block a user