mirror of
https://github.com/zyedidia/micro
synced 2024-09-29 20:54:50 +00:00
Temporarily don't initialize runtime files in buffer test
Adding InitRuntimeFiles() to buffer_test.go has changed the behavior of this test: now it tests not just buffer editing per se, but also how well buffer editing works together with syntax highlighting (since InitRuntimeFiles() loads syntax files, and many of the test buffers match the json header pattern in the json.yaml syntax file, so they are "highlighted" as json). This revealed long existing races between buffer editing and syntax highlighting. Until we fix those races, temporarily disable InitRuntimeFiles() in this test.
This commit is contained in:
parent
c5d32f625b
commit
69dc54b407
|
@ -20,7 +20,9 @@ type operation struct {
|
|||
|
||||
func init() {
|
||||
ulua.L = lua.NewState()
|
||||
config.InitRuntimeFiles(false)
|
||||
// TODO: uncomment InitRuntimeFiles once we fix races between syntax
|
||||
// highlighting and buffer editing.
|
||||
// config.InitRuntimeFiles(false)
|
||||
config.InitGlobalSettings()
|
||||
config.GlobalSettings["backup"] = false
|
||||
config.GlobalSettings["fastdirty"] = true
|
||||
|
|
|
@ -39,6 +39,10 @@ type RuntimeFile interface {
|
|||
var allFiles [][]RuntimeFile
|
||||
var realFiles [][]RuntimeFile
|
||||
|
||||
func init() {
|
||||
initRuntimeVars()
|
||||
}
|
||||
|
||||
func initRuntimeVars() {
|
||||
allFiles = make([][]RuntimeFile, NumTypes)
|
||||
realFiles = make([][]RuntimeFile, NumTypes)
|
||||
|
|
Loading…
Reference in a new issue