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

Linefeed not accepted as newline #170

Open
ghost opened this issue Jun 9, 2019 · 2 comments
Open

Linefeed not accepted as newline #170

ghost opened this issue Jun 9, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 9, 2019

If I run the example, I can paste CR or CR+LF lines:

$ ./linenoise_example
hello> expr 5 + 2
echo: 'expr 5 + 2'
hello> expr 5 - 2
echo: 'expr 5 - 2'

but if I try to paste LF lines, I get unexpected result:

$ ./linenoise_example
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
hello> expr 5 + 2
expr 5 - 2
echo: 'expr 5 + 2
expr 5 - 2'
@ghost
Copy link
Author

ghost commented Jun 9, 2019

Git Bisect reveals this:

12a8680d8a0b7c6b513ba82eb437fb7e621a73bd is the first bad commit
commit 12a8680d8a0b7c6b513ba82eb437fb7e621a73bd
Author: antirez <antirez@gmail.com>
Date:   Tue Apr 12 17:59:33 2016 +0200

    Hints WIP

ghost referenced this issue Jun 9, 2019
@ghost
Copy link
Author

ghost commented Jun 9, 2019

Note a fork fixed the issue, see linked commit below. It would be added here:

ENTER = 13, /* Enter */

case ENTER: /* enter */

ghost referenced this issue in rain-1/linenoise-mob Jun 9, 2019
In Android's adb shell environment test, click ENTER get line-feed.
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

0 participants