Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Fix split direction issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bryphe committed Mar 2, 2018
1 parent d0e480b commit 44c1e4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions browser/src/Editor/OniEditor/OniEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { ErrorsContainer } from "./containers/ErrorsContainer"

import { NeovimEditor } from "./../NeovimEditor"

import { windowManager } from "./../../Services/WindowManager"
import { windowManager, SplitDirection } from "./../../Services/WindowManager"

import { ImageBufferLayer } from "./ImageBufferLayer"

Expand Down Expand Up @@ -177,8 +177,9 @@ export class OniEditor implements IEditor {
openMode === Oni.FileOpenMode.HorizontalSplit ||
openMode === Oni.FileOpenMode.VerticalSplit
) {
// TODO
const newEditor = await this._split("horizontal")
const splitDirection =
openMode === Oni.FileOpenMode.HorizontalSplit ? "horizontal" : "vertical"
const newEditor = await this._split(splitDirection)
return newEditor.openFile(file, { openMode: Oni.FileOpenMode.Edit })
}
}
Expand Down Expand Up @@ -230,7 +231,7 @@ export class OniEditor implements IEditor {
return this._neovimEditor.render()
}

private async _split(direction: any): Promise<OniEditor> {
private async _split(direction: SplitDirection): Promise<OniEditor> {
const newEditor = new OniEditor(
this._colors,
this._completionProviders,
Expand Down

0 comments on commit 44c1e4e

Please sign in to comment.