Make height option work under Windows (#1341)

Separate Unix & Windows code into platform specific files for light renderer
This commit is contained in:
Michael Kelley
2019-02-04 22:51:39 -08:00
committed by Junegunn Choi
parent 7c40a424c0
commit 7d5985baf9
5 changed files with 244 additions and 69 deletions

View File

@@ -11,7 +11,6 @@ import (
"github.com/junegunn/fzf/src/algo"
"github.com/junegunn/fzf/src/tui"
"github.com/junegunn/fzf/src/util"
"github.com/mattn/go-runewidth"
"github.com/mattn/go-shellwords"
@@ -1412,8 +1411,8 @@ func validateSign(sign string, signOptName string) error {
}
func postProcessOptions(opts *Options) {
if util.IsWindows() && opts.Height.size > 0 {
errorExit("--height option is currently not supported on Windows")
if !tui.IsLightRendererSupported() && opts.Height.size > 0 {
errorExit("--height option is currently not supported on this platform")
}
// Default actions for CTRL-N / CTRL-P when --history is set
if opts.History != nil {