effect icon indicating copy to clipboard operation
effect copied to clipboard

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

Open m9tdev opened this issue 4 weeks ago • 0 comments

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

https://github.com/user-attachments/assets/25187c00-96b5-4d93-bc88-524ea571684f

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

m9tdev avatar Dec 02 '25 16:12 m9tdev