Skip to content

Pasting multiple lines at once with typeahead #816

@asmeurer

Description

@asmeurer

The bracketed paste to paste a bunch of lines to a single prompt doesn't seem to work properly when using typeahead. For example, copy the following lines

a
b
c

then run the following.

import time
from prompt_toolkit import prompt

time.sleep(1)

while True:
    prompt('> ')

If you paste the lines after the > prompt appears, they all paste into one prompt:

> a
b
c
>

But if you paste them before the prompt appears, they each get their own prompt:

> a
> b
> c
>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions