zee-editor / zee

A modern text editor for the terminal written in Rust
Apache License 2.0
1.47k stars 42 forks source link

Apply `theme_index` from configuration on startup #32

Closed iainh closed 2 years ago

iainh commented 2 years ago

Currently the theme_index is always set to 0 on startup, regardless of what is in the configuration file. theme_index is loaded on startup however so apply it when creating the editor component.

mcobzarenco commented 2 years ago

One thing I thought about is some sort of validation that theme_index is not out of bounds -- as that would just panic, saying "internal zee error", which isn't in this case. But given settings are being rewritten, I think it's fine as is.

iainh commented 2 years ago

I actually have a working branch myself where I've been playing around with the highlight-with-queries branch changes as well so I completely understand that anything in settings.toml is ultimately temporary. Thanks for merging this one though, hopefully it is useful to someone in the interim.