mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Sort block decorations to render by order, then id
This commit is contained in:
@@ -1191,6 +1191,10 @@ class TextEditorComponent {
|
||||
decorationsByScreenLine.set(screenLine.id, decorations)
|
||||
}
|
||||
decorations.push(decoration)
|
||||
|
||||
// Order block decorations by increasing values of their "order" property. Break ties with "id", which mirrors
|
||||
// their creation sequence.
|
||||
decorations.sort((a, b) => a.order !== b.order ? a.order - b.order : a.id - b.id)
|
||||
}
|
||||
|
||||
addTextDecorationToRender (decoration, screenRange, marker) {
|
||||
|
||||
Reference in New Issue
Block a user