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
* Initial definitions and thoughts for hotkeys
* Actually document InputKey properly
* Add a to string function for input keys
* Define keybinds and actions; restructure
* Implement hash and start on defining key bindings
* Derive Serialize for input keys
* Store the key strings as tuples for two-way mapping
* Some string to key functions
* Use termion's Key definition and implement action dispatch
* Fix some borrow-checker errors
* Missing keybind and command mode switching
* Fix incorrect handling of spawn terminal command
* fix(plugins): work with new input - tests not passing
* fix(infra): stabilize tests and properly close pty sessions
* style(fmt): rustfmt
Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* wip: tabs, just outlining stuff, for now it is a mess
* wip: tabs, just outlining stuff, for now it is a mess
* wip: formatting
* wip: some moving around
* wip: not sure why those things are not imported
* wip: cleaning up a bit
* wip: doesn't render when new tab is created?
* wip: doesnt re-render when a new tab is spawned for now
* wip: tabs now are a BTreeMap and we can switch between them in both directions
* wip: I think that should also be here
* wip: cleanup
* Spawn a new terminal simultaneously with a new tab
* Ensure proper Opening and Closing of tabs
* cleanup
* more cleanup
* tests(snapshots): add 'loading' snapshot to each scenario
* fix(tests): update snapshots
* Add tests for tabs implementation
* wip: added tests, moved tab related stuff to a separate file
* wip: var name change, removed unused imports
* chore: fromatting
* wip: tests are you ok?
* Remove next_tab_index field
* clean close_tab() logic in screen.render()
* wip: more tests added, review changes covered
* chore: a programmer and a formatter walk into a bar....
* style(screen): update description comment
* docs(tab): add comment description
Co-authored-by: denis <denis@airheadventures.com>
Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Kunal Mohan <44079328+kunalmohan@users.noreply.github.com>