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

cursor wrong when hint string begin with "\n" #178

Open
tzngit opened this issue Dec 20, 2019 · 0 comments
Open

cursor wrong when hint string begin with "\n" #178

tzngit opened this issue Dec 20, 2019 · 0 comments

Comments

@tzngit
Copy link

tzngit commented Dec 20, 2019

  1. I enabled multiline by linenoiseSetMultiLine(1);
  2. My hint list is {"hint1", "hint2", "help"},and what I return in hintcallback function is something like "\r\nhint1 | hint2", which means concat hint list with "|" into a string prepended by a "\r\n".

The question is, when I enter a 'h', my hint show up in the next line(hint1 | hint2 | help) as it should be,but when I go on entering a 'i', my cursor starts from next line, leaving the previous line a single 'h', which is not my wish.I hope the character I entered could be in same line, just like the way I enter words in terminal.

My question is like this(assume my prompt is >):

h
hint1 | hint2 | help
hi
hint1 | hint2

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

1 participant