File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
src/vs/editor/common/viewLayout Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -96,23 +96,24 @@ export class LineDecoration {
9696 }
9797
9898 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 ) {
113104 return a . endColumn - b . endColumn ;
114105 }
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 ;
116117 }
117118}
118119
You can’t perform that action at this time.
0 commit comments