@@ -278,16 +278,18 @@ class InlineDiffView extends BaseDiffView {
278278 diffView . sessionB [ "_emit" ] ( "changeFold" , { data : { start : { row : 0 } } } ) ;
279279 }
280280
281- onChangeWrapLimit ( ) {
282- this . sessionB . adjustWrapLimit ( this . sessionA . $wrapLimit ) ;
281+ onChangeWrapLimit ( e , session ) {
282+ this . otherSession . setOption ( "wrap" , session . getOption ( "wrap" ) ) ;
283+ this . otherSession . adjustWrapLimit ( session . $wrapLimit ) ;
283284 this . scheduleRealign ( ) ;
284285 }
285286
286287 $attachSessionsEventHandlers ( ) {
287288 this . $attachSessionEventHandlers ( this . editorA , this . markerA ) ;
288289 this . $attachSessionEventHandlers ( this . editorB , this . markerB ) ;
289- this . sessionA . on ( "changeWrapLimit" , this . onChangeWrapLimit ) ;
290- this . sessionA . on ( "changeWrapMode" , this . onChangeWrapLimit ) ;
290+ var session = this . activeEditor . session ;
291+ session . on ( "changeWrapLimit" , this . onChangeWrapLimit ) ;
292+ session . on ( "changeWrapMode" , this . onChangeWrapLimit ) ;
291293 }
292294
293295 $attachSessionEventHandlers ( editor , marker ) {
@@ -301,8 +303,9 @@ class InlineDiffView extends BaseDiffView {
301303 this . $detachSessionHandlers ( this . editorA , this . markerA ) ;
302304 this . $detachSessionHandlers ( this . editorB , this . markerB ) ;
303305 this . otherSession . bgTokenizer . lines . fill ( undefined ) ;
304- this . sessionA . off ( "changeWrapLimit" , this . onChangeWrapLimit ) ;
305- this . sessionA . off ( "changeWrapMode" , this . onChangeWrapLimit ) ;
306+ var session = this . activeEditor . session ;
307+ session . off ( "changeWrapLimit" , this . onChangeWrapLimit ) ;
308+ session . off ( "changeWrapMode" , this . onChangeWrapLimit ) ;
306309 }
307310
308311 $detachSessionHandlers ( editor , marker ) {
0 commit comments