mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
The `Config` can be passed when creating the backend (for example `CrosstermBackend::new`) and is already updated in the `Backend::reconfigure` callback. Recreating the tui `Config` during `claim` and `restore` is unnecessary and causes a clone of the editor's Config which is a fairly large type. This change drops the `Config` parameter from those callbacks and updates the callers. Instead it is passed to `CrosstermBackend` which then owns it. I've also moved the override from the `editor.undercurl` key onto the tui `Config` type - I believe it was just an oversight that this was not done originally. And I've updated the `From<EditorConfig> for Config` to take a reference to the editor's `Config` to avoid the unnecessary clone during `CrosstermBackend::new` and `Backend::reconfigure`.