rat
rat copied to clipboard
Split with golden ratio
This PR defines a new strategy for splitting panes, instead of dividing the available size (width or height) evenly it uses the golden ratio as a proportion for the split, making the active panel larger.
Something like this
+-----+-----------+-----------------------+
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----+-----------+-----------------------+
I decided to abstract the split function to be able to test and prevent regressions. It could be that having an option for switching between functions is desirable but I think that in most cases, you want to focus the content of the active panel.
Tests can be abstracted and simplified, but as a start, this should do.