mirror of https://github.com/helix-editor/helix
vsplit can now split scratch buffers.
parent
8a949fb011
commit
adaf861881
|
@ -2163,14 +2163,10 @@ pub fn jump_backward(cx: &mut Context) {
|
||||||
//
|
//
|
||||||
|
|
||||||
pub fn vsplit(cx: &mut Context) {
|
pub fn vsplit(cx: &mut Context) {
|
||||||
// TODO: use doc.id directly, this can only split saved files
|
use helix_view::editor::Action;
|
||||||
let path = cx.doc().path().cloned();
|
let id = cx.doc().id();
|
||||||
|
|
||||||
if let Some(path) = path {
|
cx.editor.switch(id, Action::VerticalSplit);
|
||||||
// open the same file again. this will vsplit
|
|
||||||
cx.editor
|
|
||||||
.open(path, helix_view::editor::Action::VerticalSplit);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn space_mode(cx: &mut Context) {
|
pub fn space_mode(cx: &mut Context) {
|
||||||
|
|
Loading…
Reference in New Issue