feat: don't center screen when navigation destination is on-screen
This commit is contained in:
parent
31561242db
commit
3e97f6627c
1 changed files with 4 additions and 1 deletions
|
@ -3162,6 +3162,9 @@ pub const Editor = struct {
|
||||||
@intCast(if (column < 1) 0 else column - 1),
|
@intCast(if (column < 1) 0 else column - 1),
|
||||||
) catch |e| return tp.exit_error(e);
|
) catch |e| return tp.exit_error(e);
|
||||||
if (have_sel) primary.selection = sel;
|
if (have_sel) primary.selection = sel;
|
||||||
|
if (self.view.is_visible(&primary.cursor))
|
||||||
|
self.clamp()
|
||||||
|
else
|
||||||
try self.scroll_view_center(.{});
|
try self.scroll_view_center(.{});
|
||||||
try self.send_editor_jump_destination();
|
try self.send_editor_jump_destination();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue