Skip to content

Support multi-line paste#145

Open
shendiaomo wants to merge 2 commits intoc-bata:masterfrom
shendiaomo:multiline_paste
Open

Support multi-line paste#145
shendiaomo wants to merge 2 commits intoc-bata:masterfrom
shendiaomo:multiline_paste

Conversation

@shendiaomo
Copy link

When pasting (e. g. ⌘-v on Mac) multiline text to a go-prompt application, Prompt.readBuffer gets all the input as a whole, which makes Prompt.feed falls to the NotDefined case even if there's a '/r' in each line. As a result, the multiline input cannot be execute properly because it ruins the buffer area .

This commit fix the problem by sending newlines (if any) seperately.

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.

1 participant