parent
e0a8e90ad9
commit
98778a80c2
2 changed files with 6 additions and 0 deletions
|
@ -403,6 +403,7 @@ 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))
|
||||
|
|
|
@ -18,6 +18,11 @@ type ViewType struct {
|
|||
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}
|
||||
}
|
||||
|
||||
var (
|
||||
vtDefault = ViewType{0, false, false}
|
||||
vtHelp = ViewType{1, true, true}
|
||||
|
|
Loading…
Reference in a new issue