prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Dynamically resizing windows requires private interface, please make public

Open
#204 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

In scopatz/xonsh#592, we want the amount of reserved space at the bottom of the prompt to be zero unless a tab event generates a menu of completion options. This can be done by swapping out the _height attribute of a Window instance. _height is a function that returns a LayoutDimension. This works great. The only thing that has me worried is that this is private interface. We do this swapping in the Completer as appropriate.

If there is a public interface, please let me know and I'll switch to that. If not please make this public to enable this much needed behavior. Note that we don't need / want the reserved space to drop back down after the completion. This is sufficient.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Window._height interface, LayoutDimension, and the Completer integration described in the issue; no file or test is named. Define and verify a public way to control reserved prompt space so it is zero by default, expands for completion menus, and does not shrink afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.