File tree 1 file changed +16
-15
lines changed
src/vs/editor/common/viewLayout
1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -96,23 +96,24 @@ export class LineDecoration {
96
96
}
97
97
98
98
public static compare ( a : LineDecoration , b : LineDecoration ) : number {
99
- if ( a . startColumn === b . startColumn ) {
100
- if ( a . endColumn === b . endColumn ) {
101
- const typeCmp = LineDecoration . _typeCompare ( a . type , b . type ) ;
102
- if ( typeCmp === 0 ) {
103
- if ( a . className < b . className ) {
104
- return - 1 ;
105
- }
106
- if ( a . className > b . className ) {
107
- return 1 ;
108
- }
109
- return 0 ;
110
- }
111
- return typeCmp ;
112
- }
99
+ if ( a . startColumn !== b . startColumn ) {
100
+ return a . startColumn - b . startColumn ;
101
+ }
102
+
103
+ if ( a . endColumn !== b . endColumn ) {
113
104
return a . endColumn - b . endColumn ;
114
105
}
115
- return a . startColumn - b . startColumn ;
106
+
107
+ const typeCmp = LineDecoration . _typeCompare ( a . type , b . type ) ;
108
+ if ( typeCmp !== 0 ) {
109
+ return typeCmp ;
110
+ }
111
+
112
+ if ( a . className !== b . className ) {
113
+ return a . className < b . className ? - 1 : 1 ;
114
+ }
115
+
116
+ return 0 ;
116
117
}
117
118
}
118
119
You can’t perform that action at this time.
0 commit comments