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 9c3c6a1 commit 1acdfaaCopy full SHA for 1acdfaa
helix-term/src/commands.rs
@@ -4142,12 +4142,16 @@ fn split(cx: &mut Context, action: Action) {
4142
let (view, doc) = current!(cx.editor);
4143
let id = doc.id();
4144
let selection = doc.selection(view.id).clone();
4145
+ let offset = view.offset;
4146
4147
cx.editor.switch(id, action);
4148
4149
// match the selection in the previous view
4150
4151
doc.set_selection(view.id, selection);
4152
+ // match the view scroll offset (switch doesn't handle this fully
4153
+ // since the selection is only matched after the split)
4154
+ view.offset = offset;
4155
}
4156
4157
fn hsplit(cx: &mut Context) {
0 commit comments