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
Implement jumping across splitters #371
Conversation
@AlexPl292 I also changed the type of |
We're not using an autoformatter, just our best judgement (although I've tried to keep things around 80-ish lines). Happy to merge when you're ready, maybe we can do a soft release this time to give @AlexPl292 a heads up before releasing it to the world. Feel free to bump the version and update the release notes if you're comfortable doing that. Thanks. |
I see. I checked easymotion and it looks like it works fine without needing an update, it just works the "old" way without cross-splitter jumps. Should be easy for easymotion to add support for those if they want. |
Bumped version to 3.8.0. |
#370
For now I made it so only the main editor scrolls if none of the editors have any visible matches. Not sure if it'd be a better idea to scroll another editor if the main editor has no matches, and then allow cycling across splitters, what do you think?
Disabled shift for cross-editor jumping, but kept it for
TARGET
mode.Cycling is in main editor only, but it could be worth a try to make it so the last tag in the main editor cycles to the first tag in the next editor, and so on.
Note, since
@ExternalUsage fun markResults(resultsToMark: SortedSet<Int>)
only has a list of offsets, I made it so it only works if there is a single editor. When IdeaVim-EasyMotion starts a session it only has one editor so it will continue to work. @AlexPl292 if you'd like to take advantage of this feature, I addedSession.markResults(resultsToMark: Map<Editor, Collection<Int>>)
SessionManager.start(mainEditor: Editor, jumpEditors: List<Editor>)
which lets you initiate a session with multiple editors, and then send markers per editor. An example of starting a session with all open editors is in AceAction.kt. Note that
Collection<Int>
can be FastUtil'sIntArrayList
to avoid boxing.Also, @breandan please run your autoformatter on it, I enabled edits by maintainers so you should be able to push it into the branch, and then I think I can squash and force-push into the branch to make sure formatting is correct in the first commit.