on master help sign in
vsplit can now split scratch buffers.
adaf861Blaž Hrastnik
helix-term/src/commands.rs+3−7
@@ -2163,14 +2163,10 @@ pub fn jump_backward(cx: &mut Context) {
2163//
2163//
2164
2164
2165pub fn vsplit(cx: &mut Context) {
2165pub fn vsplit(cx: &mut Context) {
2166− // TODO: use doc.id directly, this can only split saved files
2166+ use helix_view::editor::Action;
2167− let path = cx.doc().path().cloned();
2167+ let id = cx.doc().id();
2168
2168
2169− if let Some(path) = path {
2170− // open the same file again. this will vsplit
2171− cx.editor
2172− .open(path, helix_view::editor::Action::VerticalSplit);
2169+ cx.editor.switch(id, Action::VerticalSplit);
2173− }
2174}
2170}
2175
2171
2176pub fn space_mode(cx: &mut Context) {
2172pub fn space_mode(cx: &mut Context) {