-
Notifications
You must be signed in to change notification settings - Fork 24
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
support undo/redo with truncate #23
Conversation
The tests fail because termion is reporting the terminal witdh to be 0. Liner does not like this. Not sure how to fix this, the same thing happens if I run in lldb on my mac. Note: tests pass when I run |
This has some bugs in it. It only works if you delete the entire line. Working on a fix for partial deletes. |
5c48103
to
4d879f5
Compare
Fixed. |
Just pushed a new rev that fixes the tests. |
I'm not sure if there needs to be a separate |
Could do this with |
When testing on travis, the terminal width is returned as 0 which leads to a divide-by-zero error. Hardcoding the size when testing avoids this issue.
087823a
to
b357c70
Compare
Ok, I reworked the patch to use the |
Prior to this patch, typing some text, moving to the start of the line, then deleting until the end of the line and attempting to undo will cause a panic. This is because the truncate() operation did not update the undo list. This has been corrected.
b357c70
to
82184e0
Compare
Prior to this patch, typing some text, moving to the start of the line,
then deleting until the end of the line and attempting to undo will
cause a panic. This is because the truncate() operation did not update
the undo list. This has been corrected.