Add beginning of cellview as well as improved ViewTypes

This is the beginning of the view refactor (#515). It's just
the start and is untested for now.
This commit is contained in:
Zachary Yedidia
2017-02-13 16:11:57 -05:00
parent 9b51069041
commit 94175d1aa6
2 changed files with 117 additions and 5 deletions

View File

@@ -11,12 +11,16 @@ import (
"github.com/zyedidia/tcell"
)
type ViewType int
type ViewType struct {
readonly bool // The file cannot be edited
scratch bool // The file cannot be saved
}
const (
vtDefault ViewType = iota
vtHelp
vtLog
var (
vtDefault = ViewType{false, false}
vtHelp = ViewType{true, true}
vtLog = ViewType{true, true}
vtScratch = ViewType{false, true}
)
// The View struct stores information about a view into a buffer.