Skip to content

Conversation

@thomasballinger
Copy link
Member

@thomasballinger thomasballinger commented Jun 7, 2016

Fix #466

Try to preserve n lines of history (try_preserve_history_height) unless that space is needed to make the completion box m lines (min_infobox_height) long (provided there is content to fill it). If there's space in the terminal below the cursor to fill and infobox content to fill ti with, go ahead and fill it.

TODO:
[x] - test desired behavior in each case
[x] - docstring describing this layout technique

@thomasballinger thomasballinger changed the title [WIP] choose completion box size based on screen size completion box size changes based on terminal size Aug 5, 2016
@thomasballinger
Copy link
Member Author

As @ikanobori suggested, I first tested the old behavior then checked it could be recreated in the old system, then changed the defaults to change behavior (see https://github.com/bpython/bpython/pull/618/files#diff-0f9439a6ef3e711e08826856e4ad77b8R699)

@thomasballinger
Copy link
Member Author

pinging @sebastinas, any thoughts on this? It

  • more tests to previous behavior
  • makes behavior more configurable
  • changes behavior

Here's what the new behavior looks like: (gif is too fast, see https://asciinema.org/a/84660)

asciicast

@thomasballinger
Copy link
Member Author

This gif reveals some possible bugs, but they're in both versions. I've created a new issue for this: #634

@sebastinas sebastinas merged commit 69aeee7 into master Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants