@@ -40,7 +40,7 @@ suite('NotebookTextModel', () => {
40
40
textModel . applyEdits ( [
41
41
{ editType : CellEditType . Replace , index : 1 , count : 0 , cells : [ new TestCell ( textModel . viewType , 5 , 'var e = 5;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
42
42
{ editType : CellEditType . Replace , index : 3 , count : 0 , cells : [ new TestCell ( textModel . viewType , 6 , 'var f = 6;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
43
- ] , true , undefined , ( ) => undefined , undefined ) ;
43
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
44
44
45
45
assert . strictEqual ( textModel . cells . length , 6 ) ;
46
46
@@ -63,7 +63,7 @@ suite('NotebookTextModel', () => {
63
63
textModel . applyEdits ( [
64
64
{ editType : CellEditType . Replace , index : 1 , count : 0 , cells : [ new TestCell ( textModel . viewType , 5 , 'var e = 5;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
65
65
{ editType : CellEditType . Replace , index : 1 , count : 0 , cells : [ new TestCell ( textModel . viewType , 6 , 'var f = 6;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
66
- ] , true , undefined , ( ) => undefined , undefined ) ;
66
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
67
67
68
68
assert . strictEqual ( textModel . cells . length , 6 ) ;
69
69
@@ -86,7 +86,7 @@ suite('NotebookTextModel', () => {
86
86
textModel . applyEdits ( [
87
87
{ editType : CellEditType . Replace , index : 1 , count : 1 , cells : [ ] } ,
88
88
{ editType : CellEditType . Replace , index : 3 , count : 1 , cells : [ ] } ,
89
- ] , true , undefined , ( ) => undefined , undefined ) ;
89
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
90
90
91
91
assert . strictEqual ( textModel . cells [ 0 ] . getValue ( ) , 'var a = 1;' ) ;
92
92
assert . strictEqual ( textModel . cells [ 1 ] . getValue ( ) , 'var c = 3;' ) ;
@@ -107,7 +107,7 @@ suite('NotebookTextModel', () => {
107
107
textModel . applyEdits ( [
108
108
{ editType : CellEditType . Replace , index : 1 , count : 1 , cells : [ ] } ,
109
109
{ editType : CellEditType . Replace , index : 3 , count : 0 , cells : [ new TestCell ( textModel . viewType , 5 , 'var e = 5;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
110
- ] , true , undefined , ( ) => undefined , undefined ) ;
110
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
111
111
assert . strictEqual ( textModel . cells . length , 4 ) ;
112
112
113
113
assert . strictEqual ( textModel . cells [ 0 ] . getValue ( ) , 'var a = 1;' ) ;
@@ -129,7 +129,7 @@ suite('NotebookTextModel', () => {
129
129
textModel . applyEdits ( [
130
130
{ editType : CellEditType . Replace , index : 1 , count : 1 , cells : [ ] } ,
131
131
{ editType : CellEditType . Replace , index : 1 , count : 0 , cells : [ new TestCell ( textModel . viewType , 5 , 'var e = 5;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
132
- ] , true , undefined , ( ) => undefined , undefined ) ;
132
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
133
133
134
134
assert . strictEqual ( textModel . cells . length , 4 ) ;
135
135
assert . strictEqual ( textModel . cells [ 0 ] . getValue ( ) , 'var a = 1;' ) ;
@@ -151,7 +151,7 @@ suite('NotebookTextModel', () => {
151
151
const textModel = editor . textModel ;
152
152
textModel . applyEdits ( [
153
153
{ editType : CellEditType . Replace , index : 1 , count : 1 , cells : [ new TestCell ( textModel . viewType , 5 , 'var e = 5;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
154
- ] , true , undefined , ( ) => undefined , undefined ) ;
154
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
155
155
156
156
assert . strictEqual ( textModel . cells . length , 4 ) ;
157
157
assert . strictEqual ( textModel . cells [ 0 ] . getValue ( ) , 'var a = 1;' ) ;
@@ -175,7 +175,7 @@ suite('NotebookTextModel', () => {
175
175
index : Number . MAX_VALUE ,
176
176
editType : CellEditType . Output ,
177
177
outputs : [ ]
178
- } ] , true , undefined , ( ) => undefined , undefined ) ;
178
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
179
179
} ) ;
180
180
181
181
// invalid index 2
@@ -184,7 +184,7 @@ suite('NotebookTextModel', () => {
184
184
index : - 1 ,
185
185
editType : CellEditType . Output ,
186
186
outputs : [ ]
187
- } ] , true , undefined , ( ) => undefined , undefined ) ;
187
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
188
188
} ) ;
189
189
190
190
textModel . applyEdits ( [ {
@@ -194,7 +194,7 @@ suite('NotebookTextModel', () => {
194
194
outputId : 'someId' ,
195
195
outputs : [ { mime : Mimes . markdown , data : valueBytesFromString ( '_Hello_' ) } ]
196
196
} ]
197
- } ] , true , undefined , ( ) => undefined , undefined ) ;
197
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
198
198
199
199
assert . strictEqual ( textModel . cells . length , 1 ) ;
200
200
assert . strictEqual ( textModel . cells [ 0 ] . outputs . length , 1 ) ;
@@ -208,7 +208,7 @@ suite('NotebookTextModel', () => {
208
208
outputId : 'someId2' ,
209
209
outputs : [ { mime : Mimes . markdown , data : valueBytesFromString ( '_Hello2_' ) } ]
210
210
} ]
211
- } ] , true , undefined , ( ) => undefined , undefined ) ;
211
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
212
212
213
213
assert . strictEqual ( textModel . cells . length , 1 ) ;
214
214
assert . strictEqual ( textModel . cells [ 0 ] . outputs . length , 2 ) ;
@@ -224,7 +224,7 @@ suite('NotebookTextModel', () => {
224
224
outputId : 'someId3' ,
225
225
outputs : [ { mime : Mimes . text , data : valueBytesFromString ( 'Last, replaced output' ) } ]
226
226
} ]
227
- } ] , true , undefined , ( ) => undefined , undefined ) ;
227
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
228
228
229
229
assert . strictEqual ( textModel . cells . length , 1 ) ;
230
230
assert . strictEqual ( textModel . cells [ 0 ] . outputs . length , 1 ) ;
@@ -262,7 +262,7 @@ suite('NotebookTextModel', () => {
262
262
outputs : [ { mime : Mimes . markdown , data : valueBytesFromString ( 'append 2' ) } ]
263
263
} ]
264
264
}
265
- ] , true , undefined , ( ) => undefined , undefined ) ;
265
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
266
266
267
267
assert . strictEqual ( textModel . cells . length , 1 ) ;
268
268
assert . strictEqual ( textModel . cells [ 0 ] . outputs . length , 2 ) ;
@@ -299,7 +299,7 @@ suite('NotebookTextModel', () => {
299
299
mime : Mimes . markdown , data : valueBytesFromString ( 'append 2' )
300
300
} ]
301
301
}
302
- ] , true , undefined , ( ) => undefined , undefined ) ;
302
+ ] , true , undefined , ( ) => undefined , undefined , true ) ;
303
303
304
304
assert . strictEqual ( textModel . cells . length , 1 ) ;
305
305
assert . strictEqual ( textModel . cells [ 0 ] . outputs . length , 1 , 'has 1 output' ) ;
@@ -324,7 +324,7 @@ suite('NotebookTextModel', () => {
324
324
index : Number . MAX_VALUE ,
325
325
editType : CellEditType . Metadata ,
326
326
metadata : { }
327
- } ] , true , undefined , ( ) => undefined , undefined ) ;
327
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
328
328
} ) ;
329
329
330
330
// invalid index 2
@@ -333,20 +333,20 @@ suite('NotebookTextModel', () => {
333
333
index : - 1 ,
334
334
editType : CellEditType . Metadata ,
335
335
metadata : { }
336
- } ] , true , undefined , ( ) => undefined , undefined ) ;
336
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
337
337
} ) ;
338
338
339
339
textModel . applyEdits ( [ {
340
340
index : 0 ,
341
341
editType : CellEditType . Metadata ,
342
342
metadata : { customProperty : 15 } ,
343
- } ] , true , undefined , ( ) => undefined , undefined ) ;
343
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
344
344
345
345
textModel . applyEdits ( [ {
346
346
index : 0 ,
347
347
editType : CellEditType . Metadata ,
348
348
metadata : { } ,
349
- } ] , true , undefined , ( ) => undefined , undefined ) ;
349
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
350
350
351
351
assert . strictEqual ( textModel . cells . length , 1 ) ;
352
352
assert . strictEqual ( textModel . cells [ 0 ] . metadata . customProperty , undefined ) ;
@@ -366,13 +366,13 @@ suite('NotebookTextModel', () => {
366
366
index : 0 ,
367
367
editType : CellEditType . PartialMetadata ,
368
368
metadata : { customProperty : 15 } ,
369
- } ] , true , undefined , ( ) => undefined , undefined ) ;
369
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
370
370
371
371
textModel . applyEdits ( [ {
372
372
index : 0 ,
373
373
editType : CellEditType . PartialMetadata ,
374
374
metadata : { } ,
375
- } ] , true , undefined , ( ) => undefined , undefined ) ;
375
+ } ] , true , undefined , ( ) => undefined , undefined , true ) ;
376
376
377
377
assert . strictEqual ( textModel . cells . length , 1 ) ;
378
378
assert . strictEqual ( textModel . cells [ 0 ] . metadata . customProperty , 15 ) ;
@@ -403,7 +403,7 @@ suite('NotebookTextModel', () => {
403
403
textModel . applyEdits ( [
404
404
{ editType : CellEditType . Replace , index : 1 , count : 1 , cells : [ ] } ,
405
405
{ editType : CellEditType . Replace , index : 1 , count : 0 , cells : [ new TestCell ( textModel . viewType , 5 , 'var e = 5;' , 'javascript' , CellKind . Code , [ ] , languageService ) ] } ,
406
- ] , true , undefined , ( ) => ( { kind : SelectionStateType . Index , focus : { start : 0 , end : 1 } , selections : [ { start : 0 , end : 1 } ] } ) , undefined ) ;
406
+ ] , true , undefined , ( ) => ( { kind : SelectionStateType . Index , focus : { start : 0 , end : 1 } , selections : [ { start : 0 , end : 1 } ] } ) , undefined , true ) ;
407
407
408
408
assert . strictEqual ( textModel . cells . length , 4 ) ;
409
409
assert . strictEqual ( textModel . cells [ 0 ] . getValue ( ) , 'var a = 1;' ) ;
@@ -449,7 +449,7 @@ suite('NotebookTextModel', () => {
449
449
editType : CellEditType . Metadata ,
450
450
metadata : { } ,
451
451
}
452
- ] , true , undefined , ( ) => ( { kind : SelectionStateType . Index , focus : { start : 0 , end : 1 } , selections : [ { start : 0 , end : 1 } ] } ) , undefined ) ;
452
+ ] , true , undefined , ( ) => ( { kind : SelectionStateType . Index , focus : { start : 0 , end : 1 } , selections : [ { start : 0 , end : 1 } ] } ) , undefined , true ) ;
453
453
454
454
assert . notStrictEqual ( changeEvent , undefined ) ;
455
455
assert . strictEqual ( changeEvent ! . rawEvents . length , 2 ) ;
@@ -641,7 +641,7 @@ suite('NotebookTextModel', () => {
641
641
}
642
642
] ;
643
643
644
- editor . textModel . applyEdits ( edits , true , undefined , ( ) => undefined , undefined ) ;
644
+ editor . textModel . applyEdits ( edits , true , undefined , ( ) => undefined , undefined , true ) ;
645
645
646
646
assert . strictEqual ( notebook . cells [ 0 ] . outputs . length , 1 ) ;
647
647
assert . strictEqual ( notebook . cells [ 0 ] . outputs [ 0 ] . outputs . length , 2 ) ;
@@ -671,7 +671,7 @@ suite('NotebookTextModel', () => {
671
671
}
672
672
] ;
673
673
674
- editor . textModel . applyEdits ( edits , true , undefined , ( ) => undefined , undefined ) ;
674
+ editor . textModel . applyEdits ( edits , true , undefined , ( ) => undefined , undefined , true ) ;
675
675
676
676
assert . strictEqual ( notebook . cells . length , 2 ) ;
677
677
assert . strictEqual ( notebook . cells [ 0 ] . outputs . length , 0 ) ;
@@ -707,7 +707,7 @@ suite('NotebookTextModel', () => {
707
707
}
708
708
] ;
709
709
710
- editor . textModel . applyEdits ( edits , true , undefined , ( ) => undefined , undefined ) ;
710
+ editor . textModel . applyEdits ( edits , true , undefined , ( ) => undefined , undefined , true ) ;
711
711
712
712
assert . strictEqual ( notebook . cells . length , 2 ) ;
713
713
assert . strictEqual ( notebook . cells [ 0 ] . outputs . length , 1 ) ;
0 commit comments