-
Notifications
You must be signed in to change notification settings - Fork 250
fix: yank should not scroll #591
fix: yank should not scroll #591
Conversation
Just found #417 which led me to find a bug in my PR - a yank backwards now doesn't scroll to the newly positioned cursor (because a yank backwards moves the cursor - why should a yank backwards move the cursor when a yank forward doesn't?) |
Hmmm, can't seem to be able to replicate the scrolling bug I was talking about, maybe df13c6b fixed it. |
24d5436
to
bb926ff
Compare
this one no longer works in the newest atom, I'm looking into fixing it |
bb926ff
to
1030148
Compare
all new and improved:
Without this PR, |
@maxbrunsfeld any thoughts on this new and improved version, please? |
1030148
to
91a25a6
Compare
91a25a6
to
616f45e
Compare
editor.setCursorBufferPosition [101, 0] | ||
expect(editor.getScrollTop()).toBe top101 | ||
|
||
|
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.
What is this test for exactly? It seems like this behavior is covered in Atom's core test suite.
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 guess this was a way for me to confirm my expectations; I'll remove it.
Other than some minor comments, looks great! |
Thank you, all fixed. |
fix: yank should not scroll
Yank currently shows the target of the motion, for example on a line that's longer than the screen,
y$
will scroll so that the end of the line is visible, andyn
will scroll to the next search match, even if that means that the cursor goes off-screen. This PR fixes that.I don't know how to spec it, similarly to #558 .