From fad5c98b8d35eede1351f9fcfc811358b917bdf5 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 20 Jan 2022 17:33:07 +0100 Subject: [PATCH] Center selections when going to definition Co-Authored-By: Nathan Sobo --- crates/editor/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index d7b1e54735772957507e2b0b6f036f52f4523e27..42b2fe30a19e2f04cc74611084e5410f4accd9c4 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -3021,7 +3021,7 @@ impl Editor { .downcast::() .unwrap(); target_editor.update(cx, |target_editor, cx| { - target_editor.select_ranges([range], Some(Autoscroll::Fit), cx); + target_editor.select_ranges([range], Some(Autoscroll::Center), cx); }); } });