-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix line end determination for a, A, $ #68
Conversation
This looks/feels like a hack. I think we need to differentiate between a cursor and a caret. it may be more proper to separate this into separate classes -- cursor class (in which insert mode will use) and a caret class (in which command mode will use). Considering the current PR, every method in the cursor class will need this new function parameter as the same bug exists for |
c82c7ae
to
2d63075
Compare
just created Caret class which is derived from Cursor class, and defined "maxLineLength" method for override between Caret and Cursor class. |
assert.equal(current.line, 0); | ||
assert.equal(current.character, 7); | ||
|
||
let right = Cursor.right(); | ||
let right = Caret.right(); | ||
assert.equal(right.line, 0); |
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.
Can we keep this test suite focused on the Cursor
class? Keep using the Cursor functions but change the expected values on the asserts?
👍 Just one note. After that, we can mergeeeeee! |
"right on right-most column should stay at the same location" is for Caret not Cursor
Is this correct? |
fix line end determination for a, A, $
fix line end determination for a, A, $