Skip to content

Properly support reading stdin#8

Merged
BlakeWilliams merged 1 commit intomainfrom
bmw/copy-newline-fix
Feb 17, 2022
Merged

Properly support reading stdin#8
BlakeWilliams merged 1 commit intomainfrom
bmw/copy-newline-fix

Conversation

@BlakeWilliams
Copy link
Owner

Currently we read from stdin and always append a newline due to
scanner.Scan splitting on newlines. This isn't always correct, since
input doesn't always have a newline.

This resolves the issue by using bufio.Reader.ReadBytes which reads
up-to the delimiter and includes it, preserving newlines.

Fixes #6

Currently we read from stdin and always append a newline due to
`scanner.Scan` splitting on newlines. This isn't always correct, since
input doesn't always have a newline.

This resolves the issue by using `bufio.Reader.ReadBytes` which reads
up-to the delimiter and includes it, preserving newlines.
@BlakeWilliams BlakeWilliams merged commit 49a54a3 into main Feb 17, 2022
@BlakeWilliams BlakeWilliams deleted the bmw/copy-newline-fix branch February 17, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote vim paste with rdm does not work as expected

1 participant