Make ViewType fields public

Ref #904
This commit is contained in:
Zachary Yedidia
2017-12-03 16:49:05 -05:00
parent 98778a80c2
commit b7214da4ea
2 changed files with 3 additions and 9 deletions

View File

@@ -403,7 +403,6 @@ func main() {
L.SetGlobal("Reload", luar.New(L, LoadAll))
L.SetGlobal("ByteOffset", luar.New(L, ByteOffset))
L.SetGlobal("ToCharPos", luar.New(L, ToCharPos))
L.SetGlobal("NewViewType", luar.New(L, NewViewType))
// Used for asynchronous jobs
L.SetGlobal("JobStart", luar.New(L, JobStart))

View File

@@ -13,14 +13,9 @@ import (
// The ViewType defines what kind of view this is
type ViewType struct {
kind int
readonly bool // The file cannot be edited
scratch bool // The file cannot be saved
}
// NewViewType creates a new ViewType - useful for plugins
func NewViewType(kind int, readonly, scratch bool) ViewType {
return ViewType{kind, readonly, scratch}
Kind int
Readonly bool // The file cannot be edited
Scratch bool // The file cannot be saved
}
var (