Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line paste fails #43

Closed
thelema opened this issue Jun 29, 2013 · 2 comments
Closed

Multi-line paste fails #43

thelema opened this issue Jun 29, 2013 · 2 comments

Comments

@thelema
Copy link

thelema commented Jun 29, 2013

I have a terminal program that I've added linenoise to, and in doing so, I've lost the ability to paste multiple lines of input into the program at once (in some terminals). It looks like https://github.com/antirez/linenoise/blob/master/linenoise.c#L200 is largely responsible for this, as the input buffer is flushed at the first \n, resulting in the extra paste information being lost. Any chance this extra data could be buffered and pushed into subsequent invocations of linenoisePrompt?

@thelema
Copy link
Author

thelema commented Jul 3, 2013

Fixed locally by changing TCSAFLUSH to TCSADRAIN in tcsetattr calls. No problems noticed with this change, and can now paste multiple lines at once.

@timotheecour
Copy link

why was this closed? first it's not merged in, second the behavior with this change is very buggy.

c-cube added a commit to ocaml-community/ocaml-linenoise that referenced this issue Mar 8, 2018
cxw42 pushed a commit to cxw42/linenoise that referenced this issue Apr 26, 2021
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

No branches or pull requests

2 participants