Go version
golang.org/.x/term v0.33.0
Output of go env
in your module/workspace:
n/a
What did you do?
t := term.NewTerminal(rw, "Test> ")
line, err := t.ReadLine()
paste multiple line
line one
line two
line three
complete code: https://github.com/ldemailly/go-scratch/blob/main/ghostty_issue/main.go
What did you see happen?
Test> line one
line two
line three
What did you expect to see?
Test> line one
Received line: "line one"
Paste indicator received.
Test> line two
Received line: "line two"
Paste indicator received.
Test> line three
Received line: "line three"
Paste indicator received.
Test>
I have the fix coming
Comment From: gopherbot
Change https://go.dev/cl/687755 mentions this issue: term: Allow multi-line bracketed paste to not create single line with LF entry
Comment From: ldemailly
Of note... that the fix makes CR and LF both equivalent in generating new command line. But that also means literal dos style CRLF paste generates an empty command. Will see/revise the PR.
Comment From: ldemailly
fixed ^ by consuming LF when there is a CR+LF