Tab completion not working in same cell
- Langage dominant
- Python
- Étoiles
- 734
- Forks
- 412
- Merge moyen
- 1 j 5 h
- PR mergées (30 j)
- 8
Description
I create two cells, run both

Then I try tab completion

If I press tab at the end of the second cell, nothing happens. If I press tab at the end of the third cells, it works.
Python repro:
```python
from ipykernel.tests.utils import new_kernel, wait_for_idle, execute, TIMEOUT
cells = [
'import datetime',
't = datetime.date.today()',
't = datetime.date.today()\nt.',
't.'
]
with new_kernel() as kc:
execute(cells[0], kc=kc)
wait_for_idle(kc)
execute(cells[1], kc=kc)
wait_for_idle(kc)
kc.complete(cells[2])
matches_1 = kc.get_shell_msg(block=True, timeout=TIMEOUT)['content']['matches']
kc.complete(cells[3])
matches_2 = kc.get_shell_msg(block=True, timeout=TIMEOUT)['content']['matches']
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start by running the Python repro with ipykernel.tests.utils, focusing on kc.complete and the two returned matches values. Trace the kernel completion handling for cells containing a newline and compare it with the single-line case. Done means completion works at the end of the second cell and the regression is covered by a test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- jupyter, python
- Domaine
- backend, developer-experience
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100