Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Select-next scrolls to top of file on even occurrences #245

Closed
atom/atom
#2423

Description

@magicznyleszek

I use cmd-d with selected word and I expect the window to scroll to the next found occurrence -- but instead the window scrolls to top on the first select-next, then scrolls to the found word on the second select-next, then again to the top on the third and so on.

Activity

  1. benogle commented on Jul 7, 2014

    @benogle
    Contributor

    I'm not understanding. Can you give me concrete steps to reproduce this? The text you were working with would be helpful. Or maybe a gif?

  2. self-assigned this
    on Jul 7, 2014
  3. magicznyleszek commented on Jul 8, 2014

    @magicznyleszek
    Author

    It occurs in any file I edit in Atom. I recorded an example on some fake data:

    select-next-01

    The steps I take:

    1. Select a word
    2. Hit cmd-d to select next occurrence
    3. Hit cmd-d again few times to select following occurrences
      • If it was even selection (2nd, 4th, 6th, ...) -- the screen scrolls to the selected word
      • If it was odd selection (3rd, 5th, ...) -- the screen jumps to the beginning of the file
    4. If I scroll down manually, I can see that the selection is being made properly

    Edit:

    Now I've discovered that the same scroll-jumping occurs when I use the vertical selection (ctrl+shift+arrowUp) -- so I'm not sure if the problem is being caused by find-and-replace package :-/

  4. magicznyleszek commented on Jul 8, 2014

    @magicznyleszek
    Author

    Managed to fix the issue by turning on Use React Editor in Core Settings.

  5. chrisknepper commented on Jul 8, 2014

    @chrisknepper

    I was having the same issue and can confirm that what @smutnyleszek said fixes it: checking Use React Editor is a working workaround.

    However, this bug probably shouldn't happen regardless of whether React Editor is enabled. It only started happening in recent versions of Atom. Perhaps there is a bug in atom or atom-shell and not find-and-replace?

  6. benogle commented on Jul 8, 2014

    @benogle
    Contributor

    Soon the react editor will be the default, and shortly after, the old editor will be pulled out completely. So we'd rather not expend extra effort fixing old editor bugs when we will just throw it away.

  7. added a commit that references this issue on Jul 9, 2014
    86ea4d9
  8. nathansobo commented on Jul 9, 2014

    @nathansobo
    Contributor

    I went ahead and made the fix for the old editor as well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions