[Bug Report] Crash when opening the configuration mode
### Version

Nightly

### Category

Major — The software does not fulfill the task it is designed for.

### Steps to Reproduce

1. Start the moe
```
moe
```

2. Open the config mode
```
:conf
```

3. Crash
```
/home/fox/git/moe/src/moe.nim(80) moe
/home/fox/git/moe/src/moe.nim(76) main
/home/fox/git/moe/src/moepkg/mainloop.nim(399) editorMainLoop
/home/fox/git/moe/src/moepkg/editorstatus.nim(710) update
/home/fox/git/moe/src/moepkg/editorview.nim(432) update
/home/fox/git/moe/src/moepkg/editorview.nim(331) writeAllLines
/home/fox/git/moe/src/moepkg/editorview.nim(273) writeCurrentLine
/home/fox/git/moe/src/moepkg/highlight.nim(44) []
/home/fox/.choosenim/toolchains/nim-1.6.10/lib/system/fatal.nim(54) sysFatal
Error: unhandled exception: index -1 not in 0 .. 0 [IndexDefect]

```

### Detailed Description

_No response_