Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upmax completions box height #466
Comments
|
If bpython knew how much space it could use freely without scrolling the display it could make this decision more intelligently, but currently it has no knowledge of this. Scrolling of the info box would be another way to make this not a reduction in functionality. |
|
There's a branch that tries out some of these ideas in the make-room branch https://github.com/bpython/bpython/compare/make-room
|
|
TODO: Try this out for a bit, make sure it works for small terminal sizes, ask @Julian or me what we think, update the branch to merge cleanly. |
|
This is merged and works alright unless the terminal is very tiny. It would be nice to make the minimum_possible_height to a much smaller value for these cases - when the screen is less than 20 tall it's impossible to have more than one line of code onscreen at once. |
|
I'd like to change it to 4, which means that when code is at the bottom of the screen only two lines of completions will be visible. I hope this is ok because one can hit ctrl-l to move the current line to the top to view more, but it would be nice to have another parameter for how many lines are visible; 4 should only become relevant for very small terminal dimensions. |
|
I propose a new system:
|
So that a full suggestions box doesn't move the current line to the very top of the screen, there should be a max height to the suggestions box. Could be a config value or a default if we can agree on one.