@@ -285,24 +285,24 @@ suite('EditorConfig extension', function () {
285
285
)
286
286
} )
287
287
288
- // test('keep selection on format', async () => {
289
- // await withSetting('insert_final_newline', 'true', {
290
- // fileName: 'test-selection',
291
- // }).saveText('foobar')
292
- // assert(window.activeTextEditor, 'no active editor')
288
+ test ( 'keep selection on format' , async ( ) => {
289
+ await withSetting ( 'insert_final_newline' , 'true' , {
290
+ fileName : 'test-selection' ,
291
+ } ) . saveText ( 'foobar' )
292
+ assert ( window . activeTextEditor , 'no active editor' )
293
293
294
- // // Before saving, the selection is on line 0. This should remain unchanged.
295
- // assert.strictEqual(
296
- // window.activeTextEditor.selection.start.line,
297
- // 0,
298
- // 'editor selection start line changed',
299
- // )
300
- // assert.strictEqual(
301
- // window.activeTextEditor.selection.end.line,
302
- // 0,
303
- // 'editor selection end line changed',
304
- // )
305
- // })
294
+ // Before saving, the selection is on line 0. This should remain unchanged.
295
+ assert . strictEqual (
296
+ window . activeTextEditor . selection . start . line ,
297
+ 0 ,
298
+ 'editor selection start line changed' ,
299
+ )
300
+ assert . strictEqual (
301
+ window . activeTextEditor . selection . end . line ,
302
+ 0 ,
303
+ 'editor selection end line changed' ,
304
+ )
305
+ } )
306
306
} )
307
307
308
308
function withSetting (
0 commit comments