Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
List style feature #7861
List style feature #7861
Changes from 26 commits
9b24335
b6fa8b9
3591a8d
f3df005
a40d46e
5a3e307
34b0e5c
8f5ff69
b42f5c7
05837c9
31e34de
bafb120
b889ae0
3f14175
c0d4212
13c418b
4a3254b
ebf5438
b8eeaeb
3d35fbf
f312825
f8faee1
87beb07
d3b2f9a
b1064e9
c31d38d
d8cf02d
879d47d
311f3a2
178ec10
eaed650
0143084
39f0604
ac39cef
373ad4c
466d244
c7e2355
7c93510
b3d5eb0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This would be a new pattern for already existing way of making such cleanups. So I'd say no for this (I might be missing a broader context though).
Ideally, we should make such cleanups using model post-fixer (basically the code that is run in listeners to this event). The
itemsToChange
can be obtained fromeditor.model.document.differ.getChanges()
.I've used this:
to check if number of events will be the same as the number of elements touched by the commands. From this perspective it looks like you can obtain changed items from differ without adding an event.
ps.: The number of integration tests might be too small for this (judging just by the number of logged entries when running all list tests):
Maybe one test with deeper nesting and/or bigger tree would be nice. So more than 2 items would change.
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 marked the event as private and added
_
as prefix. (0143084)But you're right. Post-fixer could be better solution here.
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.
This might cause "single item changed on range selection" issues.
From top of my head:
selection.getFirst/LastPostion()
to get backward/forward siblings.