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

Autocomplete not showing inside buffer in fullscreen app

Open
#1,474 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I am creating a fullscreen app, and one of the views acts like a form. Each of the inputs is created with a buffer.

One of the buffers (the "Category" input in the figure) has an autocomplete with words I take from a database. I know the autocomplete is working because if I start typing "Per" and press the arrow down it autocompletes to "Personal", which is an existing word. However, the word possibilities are not shown anywhere.

image
image

I tried increasing the height of the window for the buffer, but I got the same result.

image

I also tried replacing the Buffer with other widgets, such as a TextArea, but still no luck.

Am I doing something wrong or does the autocompletion only works at prompts?

The whole code for this app is somewhat large, but the portion for this buffer is smaller and provided here.

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 with the linked add_task_view.py around line 77 and compare the Buffer setup with the prompt-toolkit autocomplete behavior described in the issue. Reproduce the fullscreen form using the provided code, then determine whether suggestions can be displayed for a Buffer rather than only completed via the arrow key; done means visible autocomplete options appear while typing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.