atom / find-and-replace

Find and replace in a single buffer and in the project
MIT License
242 stars 219 forks source link

Maintain previous scroll position #1105

Closed darangi closed 4 years ago

darangi commented 4 years ago

Description of the Change

Maintains scroll position after opening a file from the results page.

Benefits

Always keep your last selected search result in focus whenever you return to the results page.

Possible Drawbacks

None

Applicable Issues

Fixes https://github.com/atom/find-and-replace/issues/1097

darangi commented 4 years ago

@lkashef Thanks! The test fails without the fix 😃

MadLittleMods commented 4 years ago

Can this be pushed into a new release? ✌😇 I'm stuck scrolling over and over

Aerijo commented 4 years ago

@MadLittleMods I don't know where this particular PR is, but try out the beta or nightly channels if you want to use features sooner.

MadLittleMods commented 4 years ago

@Aerijo The last release v0.219.1 is from 2019-11-1. How do I switch to the beta/nightly of the find-and-replace package? I don't see any beta tags there. I'm just assuming the find-and-replace package is updated independent of Atom releases?

Or are you referring to the Atom as a whole nightlies? https://blog.atom.io/2019/06/21/introducing-atom-nightly-releases.html (related https://blog.atom.io/2015/10/21/introducing-the-atom-beta-channel.html#a-note-to-package-authors)

Aerijo commented 4 years ago

Ah, in that case it hasn't even come to nightly yet (Atom as a whole). What you can do now is clone the repo, run apm install and then apm link at it's root directory to use the repo in it's current state. I believe the install step will require build tools installed on your computer, for any native modules. The linked package will take priority over the builtin version (after a reload), and running apm unlink find-and-replace will remove this linked version and the builtin will be used again.

danialmuqris98 commented 4 years ago

Tq

mikkovedru commented 4 years ago

Doesn't this commit also fixes https://github.com/atom/atom/issues/20259 ?

nobodo commented 4 years ago

Not sure if related to this change, but a new quirk has appeared. When there are plenty of search results, collapse all, scroll down beyond the visible ones, then expand one and follow it, return back to search tab and then collapse that item, scroll to another position and expand some other result -> position jumps.

Seems to be related to scrolling; if I don't scroll, the expand/collapse within the visible items work just fine, but after scrolling a bit, the expand/collapse jumps the scrolled amount, so I guess it does not take the scrolled amount into account.

Happens also with nightly build (1.48.0-nightly2). Platform is macOS.

stwr667 commented 3 years ago

I get this too @nobodo. Really annoying when you're working through a big search list.