mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-01 08:42:55 +08:00
newedit: Use highlight.Highlight.
This commit is contained in:
parent
af3b3b287a
commit
a7fd03abdf
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/elves/elvish/eval"
|
||||
"github.com/elves/elvish/newedit/core"
|
||||
"github.com/elves/elvish/newedit/highlight"
|
||||
)
|
||||
|
||||
// Editor is the line editor for Elvish.
|
||||
|
@ -24,6 +25,7 @@ type editor struct {
|
|||
|
||||
func NewEditor(in, out *os.File) Editor {
|
||||
ed := core.NewEditor(core.NewTTY(in, out), core.NewSignalSource())
|
||||
ed.Config.RenderConfig.Highlighter = highlight.Highlight
|
||||
return &editor{ed}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user