@@ -25,6 +25,7 @@ import { IRelaxedTextModelCreationOptions, createTextModel } from 'vs/editor/tes
2525import { MockMode } from 'vs/editor/test/common/mocks/mockMode' ;
2626import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration' ;
2727import { javascriptOnEnterRules } from 'vs/editor/test/common/modes/supports/javascriptOnEnterRules' ;
28+ import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper' ;
2829
2930const H = Handler ;
3031
@@ -152,7 +153,7 @@ suite('Editor Controller - Cursor', () => {
152153
153154 thisModel = createTextModel ( text ) ;
154155 thisConfiguration = new TestConfiguration ( { } ) ;
155- thisViewModel = new ViewModel ( 0 , thisConfiguration , thisModel , null ! ) ;
156+ thisViewModel = new ViewModel ( 0 , thisConfiguration , thisModel , CharacterHardWrappingLineMapperFactory . create ( thisConfiguration . options ) , null ! ) ;
156157
157158 thisCursor = new Cursor ( thisConfiguration , thisModel , thisViewModel ) ;
158159 } ) ;
@@ -776,7 +777,7 @@ suite('Editor Controller - Cursor', () => {
776777 'var newer = require("gulp-newer");' ,
777778 ] . join ( '\n' ) ) ;
778779 const config = new TestConfiguration ( { } ) ;
779- const viewModel = new ViewModel ( 0 , config , model , null ! ) ;
780+ const viewModel = new ViewModel ( 0 , config , model , CharacterHardWrappingLineMapperFactory . create ( config . options ) , null ! ) ;
780781 const cursor = new Cursor ( config , model , viewModel ) ;
781782
782783 moveTo ( cursor , 1 , 4 , false ) ;
@@ -816,7 +817,7 @@ suite('Editor Controller - Cursor', () => {
816817 '<property id="SomeThing" key="SomeKey" value="00X"/>' ,
817818 ] . join ( '\n' ) ) ;
818819 const config = new TestConfiguration ( { } ) ;
819- const viewModel = new ViewModel ( 0 , config , model , null ! ) ;
820+ const viewModel = new ViewModel ( 0 , config , model , CharacterHardWrappingLineMapperFactory . create ( config . options ) , null ! ) ;
820821 const cursor = new Cursor ( config , model , viewModel ) ;
821822
822823 moveTo ( cursor , 10 , 10 , false ) ;
@@ -880,7 +881,7 @@ suite('Editor Controller - Cursor', () => {
880881 '<property id="SomeThing" key="SomeKey" value="00X"/>' ,
881882 ] . join ( '\n' ) ) ;
882883 const config = new TestConfiguration ( { } ) ;
883- const viewModel = new ViewModel ( 0 , config , model , null ! ) ;
884+ const viewModel = new ViewModel ( 0 , config , model , CharacterHardWrappingLineMapperFactory . create ( config . options ) , null ! ) ;
884885 const cursor = new Cursor ( config , model , viewModel ) ;
885886
886887 moveTo ( cursor , 10 , 10 , false ) ;
@@ -929,7 +930,7 @@ suite('Editor Controller - Cursor', () => {
929930 'var newer = require("gulp-newer");' ,
930931 ] . join ( '\n' ) ) ;
931932 const config = new TestConfiguration ( { } ) ;
932- const viewModel = new ViewModel ( 0 , config , model , null ! ) ;
933+ const viewModel = new ViewModel ( 0 , config , model , CharacterHardWrappingLineMapperFactory . create ( config . options ) , null ! ) ;
933934 const cursor = new Cursor ( config , model , viewModel ) ;
934935
935936 moveTo ( cursor , 1 , 4 , false ) ;
@@ -2074,7 +2075,7 @@ suite('Editor Controller - Regression tests', () => {
20742075 wordWrap : 'wordWrapColumn' ,
20752076 wordWrapColumn : 100
20762077 } ) ;
2077- const viewModel = new ViewModel ( 0 , config , model , null ! ) ;
2078+ const viewModel = new ViewModel ( 0 , config , model , CharacterHardWrappingLineMapperFactory . create ( config . options ) , null ! ) ;
20782079 const cursor = new Cursor ( config , model , viewModel ) ;
20792080
20802081 moveTo ( cursor , 1 , 43 , false ) ;
@@ -3834,7 +3835,7 @@ function usingCursor(opts: ICursorOpts, callback: (model: TextModel, cursor: Cur
38343835 let model = createTextModel ( opts . text . join ( '\n' ) , opts . modelOpts , opts . languageIdentifier ) ;
38353836 model . forceTokenization ( model . getLineCount ( ) ) ;
38363837 let config = new TestConfiguration ( opts . editorOpts || { } ) ;
3837- let viewModel = new ViewModel ( 0 , config , model , null ! ) ;
3838+ let viewModel = new ViewModel ( 0 , config , model , CharacterHardWrappingLineMapperFactory . create ( config . options ) , null ! ) ;
38383839 let cursor = new Cursor ( config , model , viewModel ) ;
38393840
38403841 callback ( model , cursor ) ;
0 commit comments