mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-22 16:57:12 +09:00
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user