Previously, a config file was loaded within `start()`, and if the config
file is invalid, Zellij was supposed to show a user what's wrong with
it. However, since `start()` starts setting up its terminal with an
alternative screen buffer, neither standard output nor standard error
could display such an error.
This change intends to address this issue by making Zellij load a config
file before `start()`.
In addition, the patch also includes some refactorings:
* Redefine `from_cli_config` with `TryFrom`, which was introduced in
Rust 1.34
* Remove conditional declaration `cfg(not(test))` because `start()` now
receive a `Config` as the third argument
* Introduce [`tempfile`](https://crates.io/crates/tempfile) in order to
run tests with actual files
* Typo?: "Deserialisation" -> "Deserialization"
* added some comments in the input module
* InputHandler now has InputState instead of separate InputMode and permanent bool
* keybinds are now associated with a Vec<Action> instead of a single Action
* removing "persistent" modes alltogether to reimplement the feature, help bar broken
* locked command mode by default, fixes#161, help bar still broken
* status bar fixed, still a few improvements/bugs to go
* better shortcut help bar contents
* fixed last bits and i think we are good
* modified tests according to new controls, not working
* Revert "modified tests according to new controls, not working"
This reverts commit f2d9421ff0169feb83dbd9b246e59b9244cafc16.
* basic.rs tests now pass, not the rest
* close_pane.rs tests pass, but very slowly?
* compatibility.rs tests pass, very slowly as well
* {layout, {move_focus_*}}.rs all working mildly slowly
* {resize_*}.rs should all work but very slowly and funky, see PR comments
* {tabs,toggle_fullscreen}.rs pass. Test performance issue yet to be fixed
* tests now work, with a hack :| ready for merge
* rustfmt + deleted references to InputState and mode persistency
* Add custom panic hook. Print backtrace and thread, error info on panic.
* use sync_channel and SyncSender
* nit fixes and cleanup
* disable custom panic hook while running tests
* make separate errors.rs file and address other review comments
* improve panic message
* debug: does increasing time between snapshots make tests pass? (this is temporary)
* fix(tests): suspend before sending quit command
* fix(tests): add missing use
* style(format): commas are important apparently
* fix(tests): can we get away with reducing the QUIT suspense time?
* fix(tests): can we get away with 50?
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Move the input loop into a separate module
* Proof of concept implementation of command mode
* Update readme to reflect command mode
* Have Esc exit command mode
* Update tests to use command mode and make it transient by default
* Some merge fixes
* fix(tests): add missing COMMAND_TOGGLE and fix false positive test
* style(format): make rustfmt happy
* Update readme to describe command mode
Co-authored-by: Aram Drevekenin <aram@poor.dev>