rat icon indicating copy to clipboard operation
rat copied to clipboard

Split with golden ratio

Open jsantiagoh opened this issue 6 years ago • 0 comments

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.

jsantiagoh avatar Mar 11 '19 20:03 jsantiagoh