We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c62889 commit 1ddae41Copy full SHA for 1ddae41
helix-term/src/commands.rs
@@ -4182,12 +4182,16 @@ fn split(cx: &mut Context, action: Action) {
4182
let (view, doc) = current!(cx.editor);
4183
let id = doc.id();
4184
let selection = doc.selection(view.id).clone();
4185
+ let offset = view.offset;
4186
4187
cx.editor.switch(id, action);
4188
4189
// match the selection in the previous view
4190
4191
doc.set_selection(view.id, selection);
4192
+ // match the view scroll offset (switch doesn't handle this fully
4193
+ // since the selection is only matched after the split)
4194
+ view.offset = offset;
4195
}
4196
4197
fn hsplit(cx: &mut Context) {
0 commit comments