mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-17 22:40:24 +00:00
* Fix panic due to invalid regex in a syntax file When a user's custom syntax file has a malformed filename regex or header regex, MakeHeaderYaml() returns error but we do not properly handle it, which results in a panic due to a dereference of the `header` pointer which is nil: Micro encountered an error: runtime.errorString runtime error: invalid memory address or nil pointer dereference runtime/panic.go:221 (0x44c367) runtime/panic.go:220 (0x44c337) github.com/zyedidia/micro/v2/internal/buffer/buffer.go:709 (0x82bc0f) github.com/zyedidia/micro/v2/internal/buffer/buffer.go:392 (0x828292) github.com/zyedidia/micro/v2/internal/buffer/buffer.go:261 (0x8278c8) github.com/zyedidia/micro/v2/cmd/micro/micro.go:203 (0x8b9e7b) github.com/zyedidia/micro/v2/cmd/micro/micro.go:331 (0x8ba9e5) runtime/proc.go:255 (0x4386a7) runtime/asm_amd64.s:1581 (0x467941) * Do not ignore invalid filename regex error in a syntax file When the filename regex in a syntax file is malformed but the subsequent header regex is correct, the filename regex error gets silently ignored, since the `err` value is overwritten by the subsequent successful header regex result. |
||
|---|---|---|
| .. | ||
| autocomplete.go | ||
| backup.go | ||
| buffer.go | ||
| buffer_generated_test.go | ||
| buffer_test.go | ||
| cursor.go | ||
| eventhandler.go | ||
| line_array.go | ||
| line_array_test.go | ||
| loc.go | ||
| message.go | ||
| save.go | ||
| search.go | ||
| serialize.go | ||
| settings.go | ||
| stack.go | ||
| stack_test.go | ||