Skip to content

Pasting multi-line text doesn't work with Propt.text #5851

@m9tdev

Description

@m9tdev

What version of Effect is running?

3.19.8

What steps can reproduce the bug?

I'm using this piece of code to ask for user input:

const readMultiLineInput = () =>
  Effect.gen(function*() {
    yield* Console.log("Paste the example input (press Enter twice on an empty line to finish):")
    yield* Console.log("")

    const lines: Array<string> = []

    while (true) {
      const line = yield* Prompt.text({
        message: lines.length === 0 ? "Input:" : ""
      })

      // Empty line indicates end of input
      if (line.trim() === "") {
        break
      }

      lines.push(line)
    }

    return lines.join("\n")
  })

In the following video I'm pasting this piece of text (3 lines) multiple times:

11-22,95-115,998-1012,1188511880-1188511890,222220-222224,
1698522-1698528,446443-446449,38593856-38593862,565653-565659,
824824821-824824827,2121212118-2121212124
Screen.Recording.2025-12-02.at.16.53.10.mov

What is the expected behavior?

Should show the pasted 3 lines

What do you see instead?

Only the first line

Additional information

https://discord.com/channels/795981131316985866/1445399263554179252

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions