Skip to content
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

Refactoring the sticky scroll #157483

Merged
merged 15 commits into from
Aug 9, 2022
Merged

Refactoring the sticky scroll #157483

merged 15 commits into from
Aug 9, 2022

Conversation

aiday-mar
Copy link
Contributor

Refactoring the sticky scroll, the code is more concise.

@aiday-mar
Copy link
Contributor Author

aiday-mar commented Aug 8, 2022

There seems to be still an issue with the sticky scroll, I am looking into it.

@aiday-mar aiday-mar closed this Aug 8, 2022
@aiday-mar
Copy link
Contributor Author

The issue was the unnecessary deep cloning

@aiday-mar aiday-mar reopened this Aug 8, 2022
@alexdima alexdima requested a review from hediet August 8, 2022 10:55
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the following regression:

  • open a file with the contents
  • fold public getName()
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
namespace One {
	namespace Two {
		namespace Three {
			class A {
				public getName() {

				}
				public getAge() {

				}
			}
		}
	}
}

In Insiders, I see that getName() and getAge() become sticky (as expected):

Kapture.2022-08-08.at.13.02.19.mp4

With the proposed changes, getAge() does not become sticky:

Kapture.2022-08-08.at.13.03.50.mp4

I believe this might be caused by only considering the first visible range in the editor i.e. getCandidateStickyLinesIntersecting(this.editor.getVisibleRanges()[0])

@aiday-mar aiday-mar requested review from alexdima and hediet and removed request for hediet August 8, 2022 14:44
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Looks good!! I just left a few comments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants