-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Improve cursor position history (Editor) #16921
Conversation
Rework cursor position history
a5c76a3
to
be9b0c3
Compare
I will update that to use cursors instead of positions - that way if a line above the cursor is modified, the right position will be retrieved |
@impact27, this PR has conflicts now. |
@impact27, you said in the description
Could you expand on this? Does this rework helps to improve performance? |
looping through the entire history at each cursor move degrades performance over time when the history is long |
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'm curious to know the time improvement taking into account these changes, because I'm seeing that you are creating more iterations over the list.
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.
@ccordoba12 this is working as expected, I also tested it manually, I don't know if you have further comments. For me, this looks good to merge
Rework cursor position history
Description of Changes
Current cursor history loops through the entire history at each cursor position change. This PR avoids that.
Issue(s) Resolved
Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: