-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add limited cursor support (left / right) #45
Add limited cursor support (left / right) #45
Conversation
Thanks for your contribution! PRs are always welcome, I'll look into this one when I have time. |
Thanks, I'll have a look at the failures later this week. Feel free to ignore it until I add the fixes. |
I've made a small change that fixes some of the errors seen, but that introduced another bug, unfortunately. I'll let you know when it's ready. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #45 +/- ##
==========================================
+ Coverage 81.68% 82.67% +0.99%
==========================================
Files 2 2
Lines 535 560 +25
Branches 130 135 +5
==========================================
+ Hits 437 463 +26
+ Misses 64 63 -1
Partials 34 34 ☔ View full report in Codecov by Sentry. |
Ok, I believe I have added all the necessary fixes now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally found some time to look at code. I've added some questions and there is also a bug:
- Enter 'abcd'
- Press Left two times
- Press backspace five times
You'll see that command prompt>
was cleared and output is corrupted.
There are some other bugs but it looks like they will be fixed if this one is fixed (they all appear when left and backspace are used). Please take a look and fix it. Ideally, add a test case first, that reproduces the bug.
Also this change breaks arduino example, now it requires two more bytes to work. Please edit lines 23 and 24 to use 166 bytes instead of 164.
Thank you for looking at this PR.
I think I have fixed the bug you mentioned and added a few tests to check for it. Two other 'quirks' which I am not sure if they should be fixed or not are:
Good spot, fixed this. I believe this could be improved in the checks by adding some 'static_assert's, but might require some rewrite and is out of the scope of this PR. |
Ideally, this should be fixed. If you have time, you can fix it in this PR. But it may be not as straight-forward as it might seem. For example input
I wasn't able to reproduce it. Can you check if following test will fail?
If I do this in linux example, everything works as expected. |
Thank you for looking at this so soon.
Agree that it might be a bit complex. I think I will look at this in the future, but will keep it out of this PR for now. Happy to raise an issue against this if you end up merging this PR.
You are correct, it is working as expected. I looked again over my initial notes and realized that it was the same problem as described above, I just forgot to mention that I used autocomplete (tab) before moving the cursor left:
|
Merged into master, thanks again for great contribution! |
This adds limited cursor support for cursor left / right. Let me know what you think.
I started working on this a few days ago, but just noticed that you have put this repo in maintenance mode. Does this mean no PRs for features will be accepted? Thanks!