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:
Dmytro Maluka 2024-04-03 04:37:44 +02:00
parent c5d32f625b
commit 69dc54b407
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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)