Drop ncurses dependency

Close #818
This commit is contained in:
Junegunn Choi
2017-01-22 14:13:37 +09:00
parent 6ccc12c332
commit ff248d566d
11 changed files with 135 additions and 22 deletions

View File

@@ -305,8 +305,11 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal {
return util.Max(maxHeight, minHeight)
}
renderer = tui.NewLightRenderer(opts.Theme, opts.Black, opts.Mouse, opts.Tabstop, maxHeightFunc)
} else {
} else if tui.HasFullscreenRenderer() {
renderer = tui.NewFullscreenRenderer(opts.Theme, opts.Black, opts.Mouse)
} else {
renderer = tui.NewLightRenderer(opts.Theme, opts.Black, opts.Mouse, opts.Tabstop,
func(h int) int { return h })
}
wordRubout := "[^[:alnum:]][[:alnum:]]"
wordNext := "[[:alnum:]][^[:alnum:]]|(.$)"