From 5d14f56fa9822b18107a5a5efac98dfe9d08f8ce Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 3 Mar 2022 17:41:39 +0900 Subject: Reuse visual_coords_at_pos function in view --- helix-term/src/commands.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'helix-term/src') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 39a8df53..8ee05ece 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1551,6 +1551,7 @@ fn search_impl( }; doc.set_selection(view.id, selection); + // TODO: is_cursor_in_view does the same calculation as ensure_cursor_in_view if view.is_cursor_in_view(doc, 0) { view.ensure_cursor_in_view(doc, scrolloff); } else { -- cgit v1.2.3-70-g09d2